aboutsummaryrefslogtreecommitdiff
path: root/deps/v8/src/arm64
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2015-06-19 13:23:56 +0200
committerRod Vagg <rod@vagg.org>2015-08-04 11:56:14 -0700
commit70d1f32f5605465a1a630a64f6f0d35f96c7709d (patch)
tree0a349040a686eafcb0a09943ebc733477dce2781 /deps/v8/src/arm64
parent4643b8b6671607a7aff60cbbd0b384dcf2f6959e (diff)
downloadandroid-node-v8-70d1f32f5605465a1a630a64f6f0d35f96c7709d.tar.gz
android-node-v8-70d1f32f5605465a1a630a64f6f0d35f96c7709d.tar.bz2
android-node-v8-70d1f32f5605465a1a630a64f6f0d35f96c7709d.zip
deps: update v8 to 4.4.63.9
Upgrade the bundled V8 and update code in src/ and lib/ to the new API. Notable backwards incompatible changes are the removal of the smalloc module and dropped support for CESU-8 decoding. CESU-8 support can be brought back if necessary by doing UTF-8 decoding ourselves. This commit includes https://codereview.chromium.org/1192973004 to fix a build error on python 2.6 systems. The original commit log follows: Use optparse in js2c.py for python compatibility Without this change, V8 won't build on RHEL/CentOS 6 because the distro python is too old to know about the argparse module. PR-URL: https://github.com/nodejs/io.js/pull/2022 Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Diffstat (limited to 'deps/v8/src/arm64')
-rw-r--r--deps/v8/src/arm64/builtins-arm64.cc122
-rw-r--r--deps/v8/src/arm64/code-stubs-arm64.cc238
-rw-r--r--deps/v8/src/arm64/code-stubs-arm64.h12
-rw-r--r--deps/v8/src/arm64/full-codegen-arm64.cc182
-rw-r--r--deps/v8/src/arm64/interface-descriptors-arm64.cc11
-rw-r--r--deps/v8/src/arm64/lithium-arm64.cc51
-rw-r--r--deps/v8/src/arm64/lithium-arm64.h466
-rw-r--r--deps/v8/src/arm64/lithium-codegen-arm64.cc121
-rw-r--r--deps/v8/src/arm64/lithium-codegen-arm64.h6
-rw-r--r--deps/v8/src/arm64/macro-assembler-arm64.cc1
-rw-r--r--deps/v8/src/arm64/macro-assembler-arm64.h2
-rw-r--r--deps/v8/src/arm64/regexp-macro-assembler-arm64.cc107
12 files changed, 671 insertions, 648 deletions
diff --git a/deps/v8/src/arm64/builtins-arm64.cc b/deps/v8/src/arm64/builtins-arm64.cc
index dfb59c0504..3df8896576 100644
--- a/deps/v8/src/arm64/builtins-arm64.cc
+++ b/deps/v8/src/arm64/builtins-arm64.cc
@@ -799,6 +799,49 @@ void Builtins::Generate_JSConstructStubForDerived(MacroAssembler* masm) {
}
+enum IsTagged { kArgcIsSmiTagged, kArgcIsUntaggedInt };
+
+
+// Clobbers x10, x15; preserves all other registers.
+static void Generate_CheckStackOverflow(MacroAssembler* masm,
+ const int calleeOffset, Register argc,
+ IsTagged argc_is_tagged) {
+ Register function = x15;
+
+ // Check the stack for overflow.
+ // We are not trying to catch interruptions (e.g. debug break and
+ // preemption) here, so the "real stack limit" is checked.
+ Label enough_stack_space;
+ __ LoadRoot(x10, Heap::kRealStackLimitRootIndex);
+ __ Ldr(function, MemOperand(fp, calleeOffset));
+ // Make x10 the space we have left. The stack might already be overflowed
+ // here which will cause x10 to become negative.
+ // TODO(jbramley): Check that the stack usage here is safe.
+ __ Sub(x10, jssp, x10);
+ // Check if the arguments will overflow the stack.
+ if (argc_is_tagged == kArgcIsSmiTagged) {
+ __ Cmp(x10, Operand::UntagSmiAndScale(argc, kPointerSizeLog2));
+ } else {
+ DCHECK(argc_is_tagged == kArgcIsUntaggedInt);
+ __ Cmp(x10, Operand(argc, LSL, kPointerSizeLog2));
+ }
+ __ B(gt, &enough_stack_space);
+ // There is not enough stack space, so use a builtin to throw an appropriate
+ // error.
+ if (argc_is_tagged == kArgcIsUntaggedInt) {
+ __ SmiTag(argc);
+ }
+ __ Push(function, argc);
+ __ InvokeBuiltin(Builtins::STACK_OVERFLOW, CALL_FUNCTION);
+ // We should never return from the APPLY_OVERFLOW builtin.
+ if (__ emit_debug_code()) {
+ __ Unreachable();
+ }
+
+ __ Bind(&enough_stack_space);
+}
+
+
// Input:
// x0: code entry.
// x1: function.
@@ -832,6 +875,15 @@ static void Generate_JSEntryTrampolineHelper(MacroAssembler* masm,
// Push the function and the receiver onto the stack.
__ Push(function, receiver);
+ // Check if we have enough stack space to push all arguments.
+ // The function is the first thing that was pushed above after entering
+ // the internal frame.
+ const int kFunctionOffset =
+ InternalFrameConstants::kCodeOffset - kPointerSize;
+ // Expects argument count in eax. Clobbers ecx, edx, edi.
+ Generate_CheckStackOverflow(masm, kFunctionOffset, argc,
+ kArgcIsUntaggedInt);
+
// Copy arguments to the stack in a loop, in reverse order.
// x3: argc.
// x4: argv.
@@ -1006,6 +1058,11 @@ void Builtins::Generate_MarkCodeAsExecutedTwice(MacroAssembler* masm) {
}
+void Builtins::Generate_MarkCodeAsToBeExecutedOnce(MacroAssembler* masm) {
+ Generate_MarkCodeAsExecutedOnce(masm);
+}
+
+
static void Generate_NotifyStubFailureHelper(MacroAssembler* masm,
SaveFPRegsMode save_doubles) {
{
@@ -1324,71 +1381,42 @@ void Builtins::Generate_FunctionCall(MacroAssembler* masm) {
}
-static void Generate_CheckStackOverflow(MacroAssembler* masm,
- const int calleeOffset) {
- Register argc = x0;
- Register function = x15;
-
- // Check the stack for overflow.
- // We are not trying to catch interruptions (e.g. debug break and
- // preemption) here, so the "real stack limit" is checked.
- Label enough_stack_space;
- __ LoadRoot(x10, Heap::kRealStackLimitRootIndex);
- __ Ldr(function, MemOperand(fp, calleeOffset));
- // Make x10 the space we have left. The stack might already be overflowed
- // here which will cause x10 to become negative.
- // TODO(jbramley): Check that the stack usage here is safe.
- __ Sub(x10, jssp, x10);
- // Check if the arguments will overflow the stack.
- __ Cmp(x10, Operand::UntagSmiAndScale(argc, kPointerSizeLog2));
- __ B(gt, &enough_stack_space);
- // There is not enough stack space, so use a builtin to throw an appropriate
- // error.
- __ Push(function, argc);
- __ InvokeBuiltin(Builtins::STACK_OVERFLOW, CALL_FUNCTION);
- // We should never return from the APPLY_OVERFLOW builtin.
- if (__ emit_debug_code()) {
- __ Unreachable();
- }
-
- __ Bind(&enough_stack_space);
-}
-
-
static void Generate_PushAppliedArguments(MacroAssembler* masm,
const int argumentsOffset,
const int indexOffset,
const int limitOffset) {
Label entry, loop;
- Register current = x0;
- __ Ldr(current, MemOperand(fp, indexOffset));
+ Register receiver = LoadDescriptor::ReceiverRegister();
+ Register key = LoadDescriptor::NameRegister();
+
+ __ Ldr(key, MemOperand(fp, indexOffset));
__ B(&entry);
+ // Load the current argument from the arguments array.
__ Bind(&loop);
- // Load the current argument from the arguments array and push it.
- // TODO(all): Couldn't we optimize this for JS arrays?
+ __ Ldr(receiver, MemOperand(fp, argumentsOffset));
- __ Ldr(x1, MemOperand(fp, argumentsOffset));
- __ Push(x1, current);
+ // Use inline caching to speed up access to arguments.
+ Handle<Code> ic = masm->isolate()->builtins()->KeyedLoadIC_Megamorphic();
+ __ Call(ic, RelocInfo::CODE_TARGET);
- // Call the runtime to access the property in the arguments array.
- __ CallRuntime(Runtime::kGetProperty, 2);
+ // Push the nth argument.
__ Push(x0);
- // Use inline caching to access the arguments.
- __ Ldr(current, MemOperand(fp, indexOffset));
- __ Add(current, current, Smi::FromInt(1));
- __ Str(current, MemOperand(fp, indexOffset));
+ __ Ldr(key, MemOperand(fp, indexOffset));
+ __ Add(key, key, Smi::FromInt(1));
+ __ Str(key, MemOperand(fp, indexOffset));
// Test if the copy loop has finished copying all the elements from the
// arguments object.
__ Bind(&entry);
__ Ldr(x1, MemOperand(fp, limitOffset));
- __ Cmp(current, x1);
+ __ Cmp(key, x1);
__ B(ne, &loop);
// On exit, the pushed arguments count is in x0, untagged
- __ SmiUntag(current);
+ __ Mov(x0, key);
+ __ SmiUntag(x0);
}
@@ -1422,7 +1450,7 @@ static void Generate_ApplyHelper(MacroAssembler* masm, bool targetIsArgument) {
}
Register argc = x0;
- Generate_CheckStackOverflow(masm, kFunctionOffset);
+ Generate_CheckStackOverflow(masm, kFunctionOffset, argc, kArgcIsSmiTagged);
// Push current limit and index.
__ Mov(x1, 0); // Initial index.
@@ -1549,7 +1577,7 @@ static void Generate_ConstructHelper(MacroAssembler* masm) {
__ InvokeBuiltin(Builtins::REFLECT_CONSTRUCT_PREPARE, CALL_FUNCTION);
Register argc = x0;
- Generate_CheckStackOverflow(masm, kFunctionOffset);
+ Generate_CheckStackOverflow(masm, kFunctionOffset, argc, kArgcIsSmiTagged);
// Push current limit and index, constructor & newTarget
__ Mov(x1, 0); // Initial index.
diff --git a/deps/v8/src/arm64/code-stubs-arm64.cc b/deps/v8/src/arm64/code-stubs-arm64.cc
index 4247aec165..9ce5a05ce5 100644
--- a/deps/v8/src/arm64/code-stubs-arm64.cc
+++ b/deps/v8/src/arm64/code-stubs-arm64.cc
@@ -221,18 +221,22 @@ static void EmitIdenticalObjectComparison(MacroAssembler* masm,
// so we do the second best thing - test it ourselves.
// They are both equal and they are not both Smis so both of them are not
// Smis. If it's not a heap number, then return equal.
+ Register right_type = scratch;
if ((cond == lt) || (cond == gt)) {
- __ JumpIfObjectType(right, scratch, scratch, FIRST_SPEC_OBJECT_TYPE, slow,
- ge);
+ __ JumpIfObjectType(right, right_type, right_type, FIRST_SPEC_OBJECT_TYPE,
+ slow, ge);
+ __ Cmp(right_type, SYMBOL_TYPE);
+ __ B(eq, slow);
} else if (cond == eq) {
__ JumpIfHeapNumber(right, &heap_number);
} else {
- Register right_type = scratch;
__ JumpIfObjectType(right, right_type, right_type, HEAP_NUMBER_TYPE,
&heap_number);
// Comparing JS objects with <=, >= is complicated.
__ Cmp(right_type, FIRST_SPEC_OBJECT_TYPE);
__ B(ge, slow);
+ __ Cmp(right_type, SYMBOL_TYPE);
+ __ B(eq, slow);
// Normally here we fall through to return_equal, but undefined is
// special: (undefined == undefined) == true, but
// (undefined <= undefined) == false! See ECMAScript 11.8.5.
@@ -979,6 +983,8 @@ void CodeStub::GenerateStubsAheadOfTime(Isolate* isolate) {
StoreRegistersStateStub::GenerateAheadOfTime(isolate);
RestoreRegistersStateStub::GenerateAheadOfTime(isolate);
BinaryOpICWithAllocationSiteStub::GenerateAheadOfTime(isolate);
+ StoreFastElementStub::GenerateAheadOfTime(isolate);
+ TypeofStub::GenerateAheadOfTime(isolate);
}
@@ -1202,7 +1208,8 @@ void CEntryStub::Generate(MacroAssembler* masm) {
// Ask the runtime for help to determine the handler. This will set x0 to
// contain the current pending exception, don't clobber it.
- ExternalReference find_handler(Runtime::kFindExceptionHandler, isolate());
+ ExternalReference find_handler(Runtime::kUnwindAndFindExceptionHandler,
+ isolate());
DCHECK(csp.Is(masm->StackPointer()));
{
FrameScope scope(masm, StackFrame::MANUAL);
@@ -1543,6 +1550,14 @@ void InstanceofStub::Generate(MacroAssembler* masm) {
// We have a cell, so need another level of dereferencing.
__ Ldr(scratch1, MemOperand(scratch1));
__ Str(map, FieldMemOperand(scratch1, Cell::kValueOffset));
+
+ __ Mov(x14, map);
+ // |scratch1| points at the beginning of the cell. Calculate the
+ // field containing the map.
+ __ Add(function, scratch1, Operand(Cell::kValueOffset - 1));
+ __ RecordWriteField(scratch1, Cell::kValueOffset, x14, function,
+ kLRHasNotBeenSaved, kDontSaveFPRegs,
+ OMIT_REMEMBERED_SET, OMIT_SMI_CHECK);
} else {
__ StoreRoot(function, Heap::kInstanceofCacheFunctionRootIndex);
__ StoreRoot(map, Heap::kInstanceofCacheMapRootIndex);
@@ -2733,16 +2748,32 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
}
-static void GenerateRecordCallTarget(MacroAssembler* masm,
- Register argc,
+static void CallStubInRecordCallTarget(MacroAssembler* masm, CodeStub* stub,
+ Register argc, Register function,
+ Register feedback_vector,
+ Register index) {
+ FrameScope scope(masm, StackFrame::INTERNAL);
+
+ // Number-of-arguments register must be smi-tagged to call out.
+ __ SmiTag(argc);
+ __ Push(argc, function, feedback_vector, index);
+
+ DCHECK(feedback_vector.Is(x2) && index.Is(x3));
+ __ CallStub(stub);
+
+ __ Pop(index, feedback_vector, function, argc);
+ __ SmiUntag(argc);
+}
+
+
+static void GenerateRecordCallTarget(MacroAssembler* masm, Register argc,
Register function,
- Register feedback_vector,
- Register index,
- Register scratch1,
- Register scratch2) {
+ Register feedback_vector, Register index,
+ Register scratch1, Register scratch2,
+ Register scratch3) {
ASM_LOCATION("GenerateRecordCallTarget");
- DCHECK(!AreAliased(scratch1, scratch2,
- argc, function, feedback_vector, index));
+ DCHECK(!AreAliased(scratch1, scratch2, scratch3, argc, function,
+ feedback_vector, index));
// Cache the called function in a feedback vector slot. Cache states are
// uninitialized, monomorphic (indicated by a JSFunction), and megamorphic.
// argc : number of arguments to the construct function
@@ -2757,22 +2788,39 @@ static void GenerateRecordCallTarget(MacroAssembler* masm,
masm->isolate()->heap()->uninitialized_symbol());
// Load the cache state.
- __ Add(scratch1, feedback_vector,
+ Register feedback = scratch1;
+ Register feedback_map = scratch2;
+ Register feedback_value = scratch3;
+ __ Add(feedback, feedback_vector,
Operand::UntagSmiAndScale(index, kPointerSizeLog2));
- __ Ldr(scratch1, FieldMemOperand(scratch1, FixedArray::kHeaderSize));
+ __ Ldr(feedback, FieldMemOperand(feedback, FixedArray::kHeaderSize));
// A monomorphic cache hit or an already megamorphic state: invoke the
// function without changing the state.
- __ Cmp(scratch1, function);
+ // We don't know if feedback value is a WeakCell or a Symbol, but it's
+ // harmless to read at this position in a symbol (see static asserts in
+ // type-feedback-vector.h).
+ Label check_allocation_site;
+ __ Ldr(feedback_value, FieldMemOperand(feedback, WeakCell::kValueOffset));
+ __ Cmp(function, feedback_value);
__ B(eq, &done);
+ __ CompareRoot(feedback, Heap::kmegamorphic_symbolRootIndex);
+ __ B(eq, &done);
+ __ Ldr(feedback_map, FieldMemOperand(feedback, HeapObject::kMapOffset));
+ __ CompareRoot(feedback_map, Heap::kWeakCellMapRootIndex);
+ __ B(ne, FLAG_pretenuring_call_new ? &miss : &check_allocation_site);
+
+ // If the weak cell is cleared, we have a new chance to become monomorphic.
+ __ JumpIfSmi(feedback_value, &initialize);
+ __ B(&megamorphic);
if (!FLAG_pretenuring_call_new) {
+ __ bind(&check_allocation_site);
// If we came here, we need to see if we are the array function.
// If we didn't have a matching function, and we didn't find the megamorph
// sentinel, then we have in the slot either some other function or an
- // AllocationSite. Do a map check on the object in scratch1 register.
- __ Ldr(scratch2, FieldMemOperand(scratch1, AllocationSite::kMapOffset));
- __ JumpIfNotRoot(scratch2, Heap::kAllocationSiteMapRootIndex, &miss);
+ // AllocationSite.
+ __ JumpIfNotRoot(feedback_map, Heap::kAllocationSiteMapRootIndex, &miss);
// Make sure the function is the Array() function
__ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, scratch1);
@@ -2808,39 +2856,17 @@ static void GenerateRecordCallTarget(MacroAssembler* masm,
// The target function is the Array constructor,
// Create an AllocationSite if we don't already have it, store it in the
// slot.
- {
- FrameScope scope(masm, StackFrame::INTERNAL);
- CreateAllocationSiteStub create_stub(masm->isolate());
-
- // Arguments register must be smi-tagged to call out.
- __ SmiTag(argc);
- __ Push(argc, function, feedback_vector, index);
-
- // CreateAllocationSiteStub expect the feedback vector in x2 and the slot
- // index in x3.
- DCHECK(feedback_vector.Is(x2) && index.Is(x3));
- __ CallStub(&create_stub);
-
- __ Pop(index, feedback_vector, function, argc);
- __ SmiUntag(argc);
- }
+ CreateAllocationSiteStub create_stub(masm->isolate());
+ CallStubInRecordCallTarget(masm, &create_stub, argc, function,
+ feedback_vector, index);
__ B(&done);
__ Bind(&not_array_function);
}
- // An uninitialized cache is patched with the function.
-
- __ Add(scratch1, feedback_vector,
- Operand::UntagSmiAndScale(index, kPointerSizeLog2));
- __ Add(scratch1, scratch1, FixedArray::kHeaderSize - kHeapObjectTag);
- __ Str(function, MemOperand(scratch1, 0));
-
- __ Push(function);
- __ RecordWrite(feedback_vector, scratch1, function, kLRHasNotBeenSaved,
- kDontSaveFPRegs, EMIT_REMEMBERED_SET, OMIT_SMI_CHECK);
- __ Pop(function);
-
+ CreateWeakCellStub create_stub(masm->isolate());
+ CallStubInRecordCallTarget(masm, &create_stub, argc, function,
+ feedback_vector, index);
__ Bind(&done);
}
@@ -2979,7 +3005,7 @@ void CallConstructStub::Generate(MacroAssembler* masm) {
&slow);
if (RecordCallTarget()) {
- GenerateRecordCallTarget(masm, x0, function, x2, x3, x4, x5);
+ GenerateRecordCallTarget(masm, x0, function, x2, x3, x4, x5, x11);
__ Add(x5, x2, Operand::UntagSmiAndScale(x3, kPointerSizeLog2));
if (FLAG_pretenuring_call_new) {
@@ -4494,21 +4520,16 @@ void VectorRawLoadStub::GenerateForTrampoline(MacroAssembler* masm) {
static void HandleArrayCases(MacroAssembler* masm, Register receiver,
Register key, Register vector, Register slot,
- Register feedback, Register scratch1,
- Register scratch2, Register scratch3,
+ Register feedback, Register receiver_map,
+ Register scratch1, Register scratch2,
bool is_polymorphic, Label* miss) {
// feedback initially contains the feedback array
Label next_loop, prepare_next;
Label load_smi_map, compare_map;
Label start_polymorphic;
- Register receiver_map = scratch1;
- Register cached_map = scratch2;
+ Register cached_map = scratch1;
- // Receiver might not be a heap object.
- __ JumpIfSmi(receiver, &load_smi_map);
- __ Ldr(receiver_map, FieldMemOperand(receiver, HeapObject::kMapOffset));
- __ Bind(&compare_map);
__ Ldr(cached_map,
FieldMemOperand(feedback, FixedArray::OffsetOfElementAt(0)));
__ Ldr(cached_map, FieldMemOperand(cached_map, WeakCell::kValueOffset));
@@ -4520,7 +4541,7 @@ static void HandleArrayCases(MacroAssembler* masm, Register receiver,
__ Add(handler, handler, Code::kHeaderSize - kHeapObjectTag);
__ Jump(feedback);
- Register length = scratch3;
+ Register length = scratch2;
__ Bind(&start_polymorphic);
__ Ldr(length, FieldMemOperand(feedback, FixedArray::kLengthOffset));
if (!is_polymorphic) {
@@ -4538,9 +4559,9 @@ static void HandleArrayCases(MacroAssembler* masm, Register receiver,
// ^ ^
// | |
// pointer_reg too_far
- // aka feedback scratch3
- // also need receiver_map (aka scratch1)
- // use cached_map (scratch2) to look in the weak map values.
+ // aka feedback scratch2
+ // also need receiver_map
+ // use cached_map (scratch1) to look in the weak map values.
__ Add(too_far, feedback,
Operand::UntagSmiAndScale(length, kPointerSizeLog2));
__ Add(too_far, too_far, FixedArray::kHeaderSize - kHeapObjectTag);
@@ -4563,43 +4584,24 @@ static void HandleArrayCases(MacroAssembler* masm, Register receiver,
// We exhausted our array of map handler pairs.
__ jmp(miss);
-
- __ Bind(&load_smi_map);
- __ LoadRoot(receiver_map, Heap::kHeapNumberMapRootIndex);
- __ jmp(&compare_map);
}
static void HandleMonomorphicCase(MacroAssembler* masm, Register receiver,
- Register key, Register vector, Register slot,
- Register weak_cell, Register scratch,
- Label* miss) {
- // feedback initially contains the feedback array
- Label compare_smi_map;
- Register receiver_map = scratch;
- Register cached_map = weak_cell;
-
- // Move the weak map into the weak_cell register.
- __ Ldr(cached_map, FieldMemOperand(weak_cell, WeakCell::kValueOffset));
-
- // Receiver might not be a heap object.
- __ JumpIfSmi(receiver, &compare_smi_map);
+ Register receiver_map, Register feedback,
+ Register vector, Register slot,
+ Register scratch, Label* compare_map,
+ Label* load_smi_map, Label* try_array) {
+ __ JumpIfSmi(receiver, load_smi_map);
__ Ldr(receiver_map, FieldMemOperand(receiver, HeapObject::kMapOffset));
+ __ bind(compare_map);
+ Register cached_map = scratch;
+ // Move the weak map into the weak_cell register.
+ __ Ldr(cached_map, FieldMemOperand(feedback, WeakCell::kValueOffset));
__ Cmp(cached_map, receiver_map);
- __ B(ne, miss);
+ __ B(ne, try_array);
- Register handler = weak_cell;
- __ Add(handler, vector, Operand::UntagSmiAndScale(slot, kPointerSizeLog2));
- __ Ldr(handler,
- FieldMemOperand(handler, FixedArray::kHeaderSize + kPointerSize));
- __ Add(handler, handler, Code::kHeaderSize - kHeapObjectTag);
- __ Jump(weak_cell);
-
- // In microbenchmarks, it made sense to unroll this code so that the call to
- // the handler is duplicated for a HeapObject receiver and a Smi receiver.
- // TODO(mvstanton): does this hold on ARM?
- __ Bind(&compare_smi_map);
- __ JumpIfNotRoot(weak_cell, Heap::kHeapNumberMapRootIndex, miss);
+ Register handler = feedback;
__ Add(handler, vector, Operand::UntagSmiAndScale(slot, kPointerSizeLog2));
__ Ldr(handler,
FieldMemOperand(handler, FixedArray::kHeaderSize + kPointerSize));
@@ -4614,24 +4616,26 @@ void VectorRawLoadStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
Register vector = VectorLoadICDescriptor::VectorRegister(); // x3
Register slot = VectorLoadICDescriptor::SlotRegister(); // x0
Register feedback = x4;
- Register scratch1 = x5;
+ Register receiver_map = x5;
+ Register scratch1 = x6;
__ Add(feedback, vector, Operand::UntagSmiAndScale(slot, kPointerSizeLog2));
__ Ldr(feedback, FieldMemOperand(feedback, FixedArray::kHeaderSize));
- // Is it a weak cell?
- Label try_array;
- Label not_array, smi_key, key_okay, miss;
- __ Ldr(scratch1, FieldMemOperand(feedback, HeapObject::kMapOffset));
- __ JumpIfNotRoot(scratch1, Heap::kWeakCellMapRootIndex, &try_array);
- HandleMonomorphicCase(masm, receiver, name, vector, slot, feedback, scratch1,
- &miss);
+ // Try to quickly handle the monomorphic case without knowing for sure
+ // if we have a weak cell in feedback. We do know it's safe to look
+ // at WeakCell::kValueOffset.
+ Label try_array, load_smi_map, compare_map;
+ Label not_array, miss;
+ HandleMonomorphicCase(masm, receiver, receiver_map, feedback, vector, slot,
+ scratch1, &compare_map, &load_smi_map, &try_array);
// Is it a fixed array?
__ Bind(&try_array);
+ __ Ldr(scratch1, FieldMemOperand(feedback, HeapObject::kMapOffset));
__ JumpIfNotRoot(scratch1, Heap::kFixedArrayMapRootIndex, &not_array);
- HandleArrayCases(masm, receiver, name, vector, slot, feedback, scratch1, x6,
- x7, true, &miss);
+ HandleArrayCases(masm, receiver, name, vector, slot, feedback, receiver_map,
+ scratch1, x7, true, &miss);
__ Bind(&not_array);
__ JumpIfNotRoot(feedback, Heap::kmegamorphic_symbolRootIndex, &miss);
@@ -4639,10 +4643,14 @@ void VectorRawLoadStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
Code::ComputeHandlerFlags(Code::LOAD_IC));
masm->isolate()->stub_cache()->GenerateProbe(masm, Code::LOAD_IC, code_flags,
false, receiver, name, feedback,
- scratch1, x6, x7);
+ receiver_map, scratch1, x7);
__ Bind(&miss);
LoadIC::GenerateMiss(masm);
+
+ __ Bind(&load_smi_map);
+ __ LoadRoot(receiver_map, Heap::kHeapNumberMapRootIndex);
+ __ jmp(&compare_map);
}
@@ -4662,28 +4670,30 @@ void VectorRawKeyedLoadStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
Register vector = VectorLoadICDescriptor::VectorRegister(); // x3
Register slot = VectorLoadICDescriptor::SlotRegister(); // x0
Register feedback = x4;
- Register scratch1 = x5;
+ Register receiver_map = x5;
+ Register scratch1 = x6;
__ Add(feedback, vector, Operand::UntagSmiAndScale(slot, kPointerSizeLog2));
__ Ldr(feedback, FieldMemOperand(feedback, FixedArray::kHeaderSize));
- // Is it a weak cell?
- Label try_array;
- Label not_array, smi_key, key_okay, miss;
- __ Ldr(scratch1, FieldMemOperand(feedback, HeapObject::kMapOffset));
- __ JumpIfNotRoot(scratch1, Heap::kWeakCellMapRootIndex, &try_array);
- HandleMonomorphicCase(masm, receiver, key, vector, slot, feedback, scratch1,
- &miss);
+ // Try to quickly handle the monomorphic case without knowing for sure
+ // if we have a weak cell in feedback. We do know it's safe to look
+ // at WeakCell::kValueOffset.
+ Label try_array, load_smi_map, compare_map;
+ Label not_array, miss;
+ HandleMonomorphicCase(masm, receiver, receiver_map, feedback, vector, slot,
+ scratch1, &compare_map, &load_smi_map, &try_array);
__ Bind(&try_array);
// Is it a fixed array?
+ __ Ldr(scratch1, FieldMemOperand(feedback, HeapObject::kMapOffset));
__ JumpIfNotRoot(scratch1, Heap::kFixedArrayMapRootIndex, &not_array);
// We have a polymorphic element handler.
Label polymorphic, try_poly_name;
__ Bind(&polymorphic);
- HandleArrayCases(masm, receiver, key, vector, slot, feedback, scratch1, x6,
- x7, true, &miss);
+ HandleArrayCases(masm, receiver, key, vector, slot, feedback, receiver_map,
+ scratch1, x7, true, &miss);
__ Bind(&not_array);
// Is it generic?
@@ -4702,11 +4712,15 @@ void VectorRawKeyedLoadStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
__ Add(feedback, vector, Operand::UntagSmiAndScale(slot, kPointerSizeLog2));
__ Ldr(feedback,
FieldMemOperand(feedback, FixedArray::kHeaderSize + kPointerSize));
- HandleArrayCases(masm, receiver, key, vector, slot, feedback, scratch1, x6,
- x7, false, &miss);
+ HandleArrayCases(masm, receiver, key, vector, slot, feedback, receiver_map,
+ scratch1, x7, false, &miss);
__ Bind(&miss);
KeyedLoadIC::GenerateMiss(masm);
+
+ __ Bind(&load_smi_map);
+ __ LoadRoot(receiver_map, Heap::kHeapNumberMapRootIndex);
+ __ jmp(&compare_map);
}
diff --git a/deps/v8/src/arm64/code-stubs-arm64.h b/deps/v8/src/arm64/code-stubs-arm64.h
index c9ee2c9963..528400698b 100644
--- a/deps/v8/src/arm64/code-stubs-arm64.h
+++ b/deps/v8/src/arm64/code-stubs-arm64.h
@@ -97,7 +97,7 @@ class RecordWriteStub: public PlatformCodeStub {
INCREMENTAL_COMPACTION
};
- bool SometimesSetsUpAFrame() OVERRIDE { return false; }
+ bool SometimesSetsUpAFrame() override { return false; }
static Mode GetMode(Code* stub) {
// Find the mode depending on the first two instructions.
@@ -275,9 +275,9 @@ class RecordWriteStub: public PlatformCodeStub {
kUpdateRememberedSetOnNoNeedToInformIncrementalMarker
};
- inline Major MajorKey() const FINAL { return RecordWrite; }
+ inline Major MajorKey() const final { return RecordWrite; }
- void Generate(MacroAssembler* masm) OVERRIDE;
+ void Generate(MacroAssembler* masm) override;
void GenerateIncremental(MacroAssembler* masm, Mode mode);
void CheckNeedsToInformIncrementalMarker(
MacroAssembler* masm,
@@ -285,7 +285,7 @@ class RecordWriteStub: public PlatformCodeStub {
Mode mode);
void InformIncrementalMarker(MacroAssembler* masm);
- void Activate(Code* code) OVERRIDE {
+ void Activate(Code* code) override {
code->GetHeap()->incremental_marking()->ActivateGeneratedStub(code);
}
@@ -328,7 +328,7 @@ class DirectCEntryStub: public PlatformCodeStub {
void GenerateCall(MacroAssembler* masm, Register target);
private:
- bool NeedsImmovableCode() OVERRIDE { return true; }
+ bool NeedsImmovableCode() override { return true; }
DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR();
DEFINE_PLATFORM_CODE_STUB(DirectCEntry, PlatformCodeStub);
@@ -360,7 +360,7 @@ class NameDictionaryLookupStub: public PlatformCodeStub {
Register scratch1,
Register scratch2);
- bool SometimesSetsUpAFrame() OVERRIDE { return false; }
+ bool SometimesSetsUpAFrame() override { return false; }
private:
static const int kInlinedProbes = 4;
diff --git a/deps/v8/src/arm64/full-codegen-arm64.cc b/deps/v8/src/arm64/full-codegen-arm64.cc
index 9feac938b5..aee9ddf403 100644
--- a/deps/v8/src/arm64/full-codegen-arm64.cc
+++ b/deps/v8/src/arm64/full-codegen-arm64.cc
@@ -13,7 +13,6 @@
#include "src/debug.h"
#include "src/full-codegen.h"
#include "src/ic/ic.h"
-#include "src/isolate-inl.h"
#include "src/parser.h"
#include "src/scopes.h"
@@ -125,7 +124,8 @@ void FullCodeGenerator::Generate() {
// Sloppy mode functions and builtins need to replace the receiver with the
// global proxy when called as functions (without an explicit receiver
// object).
- if (is_sloppy(info->language_mode()) && !info->is_native()) {
+ if (is_sloppy(info->language_mode()) && !info->is_native() &&
+ info->MayUseThis()) {
Label ok;
int receiver_offset = info->scope()->num_parameters() * kXRegSize;
__ Peek(x10, receiver_offset);
@@ -959,38 +959,6 @@ void FullCodeGenerator::VisitFunctionDeclaration(
}
-void FullCodeGenerator::VisitModuleDeclaration(ModuleDeclaration* declaration) {
- Variable* variable = declaration->proxy()->var();
- ModuleDescriptor* descriptor = declaration->module()->descriptor();
- DCHECK(variable->location() == Variable::CONTEXT);
- DCHECK(descriptor->IsFrozen());
-
- Comment cmnt(masm_, "[ ModuleDeclaration");
- EmitDebugCheckDeclarationContext(variable);
-
- // Load instance object.
- __ LoadContext(x1, scope_->ContextChainLength(scope_->ScriptScope()));
- __ Ldr(x1, ContextMemOperand(x1, descriptor->Index()));
- __ Ldr(x1, ContextMemOperand(x1, Context::EXTENSION_INDEX));
-
- // Assign it.
- __ Str(x1, ContextMemOperand(cp, variable->index()));
- // We know that we have written a module, which is not a smi.
- __ RecordWriteContextSlot(cp,
- Context::SlotOffset(variable->index()),
- x1,
- x3,
- kLRHasBeenSaved,
- kDontSaveFPRegs,
- EMIT_REMEMBERED_SET,
- OMIT_SMI_CHECK);
- PrepareForBailoutForId(declaration->proxy()->id(), NO_REGISTERS);
-
- // Traverse info body.
- Visit(declaration->module());
-}
-
-
void FullCodeGenerator::VisitImportDeclaration(ImportDeclaration* declaration) {
VariableProxy* proxy = declaration->proxy();
Variable* variable = proxy->var();
@@ -1272,6 +1240,7 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) {
// just skip it.
__ Push(x1, x3);
__ InvokeBuiltin(Builtins::FILTER_KEY, CALL_FUNCTION);
+ PrepareForBailoutForId(stmt->FilterId(), TOS_REG);
__ Mov(x3, x0);
__ Cbz(x0, loop_statement.continue_label());
@@ -1740,19 +1709,17 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
}
break;
}
+ __ Peek(x0, 0);
+ __ Push(x0);
+ VisitForStackValue(key);
+ VisitForStackValue(value);
if (property->emit_store()) {
- // Duplicate receiver on stack.
- __ Peek(x0, 0);
- __ Push(x0);
- VisitForStackValue(key);
- VisitForStackValue(value);
EmitSetHomeObjectIfNeeded(value, 2);
__ Mov(x0, Smi::FromInt(SLOPPY)); // Language mode
__ Push(x0);
__ CallRuntime(Runtime::kSetProperty, 4);
} else {
- VisitForEffect(key);
- VisitForEffect(value);
+ __ Drop(3);
}
break;
case ObjectLiteral::Property::PROTOTYPE:
@@ -2152,7 +2119,8 @@ void FullCodeGenerator::EmitInlineSmiBinaryOp(BinaryOperation* expr,
__ Bind(&stub_call);
- Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), op).code();
+ Handle<Code> code = CodeFactory::BinaryOpIC(
+ isolate(), op, language_mode()).code();
{
Assembler::BlockPoolsScope scope(masm_);
CallIC(code, expr->BinaryOperationFeedbackId());
@@ -2234,7 +2202,8 @@ void FullCodeGenerator::EmitInlineSmiBinaryOp(BinaryOperation* expr,
void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, Token::Value op) {
__ Pop(x1);
- Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), op).code();
+ Handle<Code> code = CodeFactory::BinaryOpIC(
+ isolate(), op, language_mode()).code();
JumpPatchSite patch_site(masm_); // Unbound, signals no inlined smi code.
{
Assembler::BlockPoolsScope scope(masm_);
@@ -2805,6 +2774,21 @@ void FullCodeGenerator::EmitLoadSuperConstructor() {
}
+void FullCodeGenerator::EmitInitializeThisAfterSuper(
+ SuperReference* super_ref) {
+ Variable* this_var = super_ref->this_var()->var();
+ GetVar(x1, this_var);
+ Label uninitialized_this;
+ __ JumpIfRoot(x1, Heap::kTheHoleValueRootIndex, &uninitialized_this);
+ __ Mov(x0, Operand(this_var->name()));
+ __ Push(x0);
+ __ CallRuntime(Runtime::kThrowReferenceError, 1);
+ __ bind(&uninitialized_this);
+
+ EmitVariableAssignment(this_var, Token::INIT_CONST);
+}
+
+
void FullCodeGenerator::VisitCall(Call* expr) {
#ifdef DEBUG
// We want to verify that RecordJSReturnSite gets called on all paths
@@ -3029,17 +3013,7 @@ void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) {
RecordJSReturnSite(expr);
- SuperReference* super_ref = expr->expression()->AsSuperReference();
- Variable* this_var = super_ref->this_var()->var();
- GetVar(x1, this_var);
- Label uninitialized_this;
- __ JumpIfRoot(x1, Heap::kTheHoleValueRootIndex, &uninitialized_this);
- __ Mov(x0, Operand(this_var->name()));
- __ Push(x0);
- __ CallRuntime(Runtime::kThrowReferenceError, 1);
- __ bind(&uninitialized_this);
-
- EmitVariableAssignment(this_var, Token::INIT_CONST);
+ EmitInitializeThisAfterSuper(expr->expression()->AsSuperReference());
context()->Plug(x0);
}
@@ -4294,28 +4268,81 @@ void FullCodeGenerator::EmitDebugIsActive(CallRuntime* expr) {
}
+void FullCodeGenerator::EmitCallSuperWithSpread(CallRuntime* expr) {
+ // Assert: expr === CallRuntime("ReflectConstruct")
+ CallRuntime* call = expr->arguments()->at(0)->AsCallRuntime();
+ ZoneList<Expression*>* args = call->arguments();
+ DCHECK_EQ(3, args->length());
+
+ SuperReference* super_reference = args->at(0)->AsSuperReference();
+
+ // Load ReflectConstruct function
+ EmitLoadJSRuntimeFunction(call);
+
+ // Push the target function under the receiver.
+ __ Pop(x10);
+ __ Push(x0, x10);
+
+ // Push super
+ EmitLoadSuperConstructor();
+ __ Push(result_register());
+
+ // Push arguments array
+ VisitForStackValue(args->at(1));
+
+ // Push NewTarget
+ DCHECK(args->at(2)->IsVariableProxy());
+ VisitForStackValue(args->at(2));
+
+ EmitCallJSRuntimeFunction(call);
+
+ // Restore context register.
+ __ Ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
+ context()->DropAndPlug(1, x0);
+
+ EmitInitializeThisAfterSuper(super_reference);
+}
+
+
+void FullCodeGenerator::EmitLoadJSRuntimeFunction(CallRuntime* expr) {
+ // Push the builtins object as the receiver.
+ __ Ldr(x10, GlobalObjectMemOperand());
+ __ Ldr(LoadDescriptor::ReceiverRegister(),
+ FieldMemOperand(x10, GlobalObject::kBuiltinsOffset));
+ __ Push(LoadDescriptor::ReceiverRegister());
+
+ // Load the function from the receiver.
+ Handle<String> name = expr->name();
+ __ Mov(LoadDescriptor::NameRegister(), Operand(name));
+ if (FLAG_vector_ics) {
+ __ Mov(VectorLoadICDescriptor::SlotRegister(),
+ SmiFromSlot(expr->CallRuntimeFeedbackSlot()));
+ CallLoadIC(NOT_CONTEXTUAL);
+ } else {
+ CallLoadIC(NOT_CONTEXTUAL, expr->CallRuntimeFeedbackId());
+ }
+}
+
+
+void FullCodeGenerator::EmitCallJSRuntimeFunction(CallRuntime* expr) {
+ ZoneList<Expression*>* args = expr->arguments();
+ int arg_count = args->length();
+
+ // Record source position of the IC call.
+ SetSourcePosition(expr->position());
+ CallFunctionStub stub(isolate(), arg_count, NO_CALL_FUNCTION_FLAGS);
+ __ Peek(x1, (arg_count + 1) * kPointerSize);
+ __ CallStub(&stub);
+}
+
+
void FullCodeGenerator::VisitCallRuntime(CallRuntime* expr) {
ZoneList<Expression*>* args = expr->arguments();
int arg_count = args->length();
if (expr->is_jsruntime()) {
Comment cmnt(masm_, "[ CallRunTime");
- // Push the builtins object as the receiver.
- __ Ldr(x10, GlobalObjectMemOperand());
- __ Ldr(LoadDescriptor::ReceiverRegister(),
- FieldMemOperand(x10, GlobalObject::kBuiltinsOffset));
- __ Push(LoadDescriptor::ReceiverRegister());
-
- // Load the function from the receiver.
- Handle<String> name = expr->name();
- __ Mov(LoadDescriptor::NameRegister(), Operand(name));
- if (FLAG_vector_ics) {
- __ Mov(VectorLoadICDescriptor::SlotRegister(),
- SmiFromSlot(expr->CallRuntimeFeedbackSlot()));
- CallLoadIC(NOT_CONTEXTUAL);
- } else {
- CallLoadIC(NOT_CONTEXTUAL, expr->CallRuntimeFeedbackId());
- }
+ EmitLoadJSRuntimeFunction(expr);
// Push the target function under the receiver.
__ Pop(x10);
@@ -4325,11 +4352,7 @@ void FullCodeGenerator::VisitCallRuntime(CallRuntime* expr) {
VisitForStackValue(args->at(i));
}
- // Record source position of the IC call.
- SetSourcePosition(expr->position());
- CallFunctionStub stub(isolate(), arg_count, NO_CALL_FUNCTION_FLAGS);
- __ Peek(x1, (arg_count + 1) * kPointerSize);
- __ CallStub(&stub);
+ EmitCallJSRuntimeFunction(expr);
// Restore context register.
__ Ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
@@ -4459,10 +4482,12 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) {
case Token::TYPEOF: {
Comment cmnt(masm_, "[ UnaryOperation (TYPEOF)");
{
- StackValueContext context(this);
+ AccumulatorValueContext context(this);
VisitForTypeofValue(expr->expression());
}
- __ CallRuntime(Runtime::kTypeof, 1);
+ __ Mov(x3, x0);
+ TypeofStub typeof_stub(isolate());
+ __ CallStub(&typeof_stub);
context()->Plug(x0);
break;
}
@@ -4629,7 +4654,8 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
{
Assembler::BlockPoolsScope scope(masm_);
- Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), Token::ADD).code();
+ Handle<Code> code = CodeFactory::BinaryOpIC(
+ isolate(), Token::ADD, language_mode()).code();
CallIC(code, expr->CountBinOpFeedbackId());
patch_site.EmitPatchInfo();
}
diff --git a/deps/v8/src/arm64/interface-descriptors-arm64.cc b/deps/v8/src/arm64/interface-descriptors-arm64.cc
index 773dec4bca..7787224156 100644
--- a/deps/v8/src/arm64/interface-descriptors-arm64.cc
+++ b/deps/v8/src/arm64/interface-descriptors-arm64.cc
@@ -60,6 +60,11 @@ const Register MathPowTaggedDescriptor::exponent() { return x11; }
const Register MathPowIntegerDescriptor::exponent() { return x12; }
+const Register GrowArrayElementsDescriptor::ObjectRegister() { return x0; }
+const Register GrowArrayElementsDescriptor::KeyRegister() { return x3; }
+const Register GrowArrayElementsDescriptor::CapacityRegister() { return x2; }
+
+
void FastNewClosureDescriptor::Initialize(CallInterfaceDescriptorData* data) {
// cp: context
// x2: function info
@@ -92,6 +97,12 @@ void NumberToStringDescriptor::Initialize(CallInterfaceDescriptorData* data) {
}
+void TypeofDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+ Register registers[] = {cp, x3};
+ data->Initialize(arraysize(registers), registers, NULL);
+}
+
+
void FastCloneShallowArrayDescriptor::Initialize(
CallInterfaceDescriptorData* data) {
// cp: context
diff --git a/deps/v8/src/arm64/lithium-arm64.cc b/deps/v8/src/arm64/lithium-arm64.cc
index 4a89fc4344..a4a36bfa15 100644
--- a/deps/v8/src/arm64/lithium-arm64.cc
+++ b/deps/v8/src/arm64/lithium-arm64.cc
@@ -1221,6 +1221,15 @@ LInstruction* LChunkBuilder::DoCheckValue(HCheckValue* instr) {
}
+LInstruction* LChunkBuilder::DoCheckArrayBufferNotNeutered(
+ HCheckArrayBufferNotNeutered* instr) {
+ LOperand* view = UseRegisterAtStart(instr->value());
+ LCheckArrayBufferNotNeutered* result =
+ new (zone()) LCheckArrayBufferNotNeutered(view);
+ return AssignEnvironment(result);
+}
+
+
LInstruction* LChunkBuilder::DoCheckInstanceType(HCheckInstanceType* instr) {
LOperand* value = UseRegisterAtStart(instr->value());
LOperand* temp = TempRegister();
@@ -1586,17 +1595,10 @@ LInstruction* LChunkBuilder::DoTailCallThroughMegamorphicCache(
UseFixed(instr->receiver(), LoadDescriptor::ReceiverRegister());
LOperand* name_register =
UseFixed(instr->name(), LoadDescriptor::NameRegister());
- LOperand* slot = NULL;
- LOperand* vector = NULL;
- if (FLAG_vector_ics) {
- slot = UseFixed(instr->slot(), VectorLoadICDescriptor::SlotRegister());
- vector =
- UseFixed(instr->vector(), VectorLoadICDescriptor::VectorRegister());
- }
// Not marked as call. It can't deoptimize, and it never returns.
return new (zone()) LTailCallThroughMegamorphicCache(
- context, receiver_register, name_register, slot, vector);
+ context, receiver_register, name_register);
}
@@ -1719,21 +1721,24 @@ LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) {
instr->RequiresHoleCheck())
? TempRegister()
: NULL;
-
- LLoadKeyedFixedDouble* result =
- new(zone()) LLoadKeyedFixedDouble(elements, key, temp);
- return instr->RequiresHoleCheck()
- ? AssignEnvironment(DefineAsRegister(result))
- : DefineAsRegister(result);
+ LInstruction* result = DefineAsRegister(
+ new (zone()) LLoadKeyedFixedDouble(elements, key, temp));
+ if (instr->RequiresHoleCheck()) {
+ result = AssignEnvironment(result);
+ }
+ return result;
} else {
DCHECK(instr->representation().IsSmiOrTagged() ||
instr->representation().IsInteger32());
LOperand* temp = instr->key()->IsConstant() ? NULL : TempRegister();
- LLoadKeyedFixed* result =
- new(zone()) LLoadKeyedFixed(elements, key, temp);
- return instr->RequiresHoleCheck()
- ? AssignEnvironment(DefineAsRegister(result))
- : DefineAsRegister(result);
+ LInstruction* result =
+ DefineAsRegister(new (zone()) LLoadKeyedFixed(elements, key, temp));
+ if (instr->RequiresHoleCheck() ||
+ (instr->hole_mode() == CONVERT_HOLE_TO_UNDEFINED &&
+ info()->IsStub())) {
+ result = AssignEnvironment(result);
+ }
+ return result;
}
} else {
DCHECK((instr->representation().IsInteger32() &&
@@ -2564,12 +2569,8 @@ LInstruction* LChunkBuilder::DoTrapAllocationMemento(
LInstruction* LChunkBuilder::DoTypeof(HTypeof* instr) {
LOperand* context = UseFixed(instr->context(), cp);
- // TODO(jbramley): In ARM, this uses UseFixed to force the input to x0.
- // However, LCodeGen::DoTypeof just pushes it to the stack (for CallRuntime)
- // anyway, so the input doesn't have to be in x0. We might be able to improve
- // the ARM back-end a little by relaxing this restriction.
- LTypeof* result =
- new(zone()) LTypeof(context, UseRegisterAtStart(instr->value()));
+ LOperand* value = UseFixed(instr->value(), x3);
+ LTypeof* result = new (zone()) LTypeof(context, value);
return MarkAsCall(DefineFixed(result, x0), instr);
}
diff --git a/deps/v8/src/arm64/lithium-arm64.h b/deps/v8/src/arm64/lithium-arm64.h
index 0549689e79..7473597b15 100644
--- a/deps/v8/src/arm64/lithium-arm64.h
+++ b/deps/v8/src/arm64/lithium-arm64.h
@@ -40,6 +40,7 @@ class LCodeGen;
V(CallRuntime) \
V(CallStub) \
V(CallWithDescriptor) \
+ V(CheckArrayBufferNotNeutered) \
V(CheckInstanceType) \
V(CheckMapValue) \
V(CheckMaps) \
@@ -177,9 +178,9 @@ class LCodeGen;
#define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \
- Opcode opcode() const FINAL { return LInstruction::k##type; } \
- void CompileToNative(LCodeGen* generator) FINAL; \
- const char* Mnemonic() const FINAL { return mnemonic; } \
+ Opcode opcode() const final { return LInstruction::k##type; } \
+ void CompileToNative(LCodeGen* generator) final; \
+ const char* Mnemonic() const final { return mnemonic; } \
static L##type* cast(LInstruction* instr) { \
DCHECK(instr->Is##type()); \
return reinterpret_cast<L##type*>(instr); \
@@ -289,9 +290,9 @@ class LTemplateResultInstruction : public LInstruction {
public:
// Allow 0 or 1 output operands.
STATIC_ASSERT(R == 0 || R == 1);
- bool HasResult() const FINAL { return (R != 0) && (result() != NULL); }
+ bool HasResult() const final { return (R != 0) && (result() != NULL); }
void set_result(LOperand* operand) { results_[0] = operand; }
- LOperand* result() const OVERRIDE { return results_[0]; }
+ LOperand* result() const override { return results_[0]; }
protected:
EmbeddedContainer<LOperand*, R> results_;
@@ -309,32 +310,27 @@ class LTemplateInstruction : public LTemplateResultInstruction<R> {
private:
// Iterator support.
- int InputCount() FINAL { return I; }
- LOperand* InputAt(int i) FINAL { return inputs_[i]; }
+ int InputCount() final { return I; }
+ LOperand* InputAt(int i) final { return inputs_[i]; }
- int TempCount() FINAL { return T; }
- LOperand* TempAt(int i) FINAL { return temps_[i]; }
+ int TempCount() final { return T; }
+ LOperand* TempAt(int i) final { return temps_[i]; }
};
-class LTailCallThroughMegamorphicCache FINAL
- : public LTemplateInstruction<0, 5, 0> {
+class LTailCallThroughMegamorphicCache final
+ : public LTemplateInstruction<0, 3, 0> {
public:
LTailCallThroughMegamorphicCache(LOperand* context, LOperand* receiver,
- LOperand* name, LOperand* slot,
- LOperand* vector) {
+ LOperand* name) {
inputs_[0] = context;
inputs_[1] = receiver;
inputs_[2] = name;
- inputs_[3] = slot;
- inputs_[4] = vector;
}
LOperand* context() { return inputs_[0]; }
LOperand* receiver() { return inputs_[1]; }
LOperand* name() { return inputs_[2]; }
- LOperand* slot() { return inputs_[3]; }
- LOperand* vector() { return inputs_[4]; }
DECLARE_CONCRETE_INSTRUCTION(TailCallThroughMegamorphicCache,
"tail-call-through-megamorphic-cache")
@@ -342,9 +338,9 @@ class LTailCallThroughMegamorphicCache FINAL
};
-class LUnknownOSRValue FINAL : public LTemplateInstruction<1, 0, 0> {
+class LUnknownOSRValue final : public LTemplateInstruction<1, 0, 0> {
public:
- bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; }
+ bool HasInterestingComment(LCodeGen* gen) const override { return false; }
DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown-osr-value")
};
@@ -354,7 +350,7 @@ class LControlInstruction : public LTemplateInstruction<0, I, T> {
public:
LControlInstruction() : false_label_(NULL), true_label_(NULL) { }
- bool IsControl() const FINAL { return true; }
+ bool IsControl() const final { return true; }
int SuccessorCount() { return hydrogen()->SuccessorCount(); }
HBasicBlock* SuccessorAt(int i) { return hydrogen()->SuccessorAt(i); }
@@ -404,8 +400,8 @@ class LGap : public LTemplateInstruction<0, 0, 0> {
}
// Can't use the DECLARE-macro here because of sub-classes.
- bool IsGap() const OVERRIDE { return true; }
- void PrintDataTo(StringStream* stream) OVERRIDE;
+ bool IsGap() const override { return true; }
+ void PrintDataTo(StringStream* stream) override;
static LGap* cast(LInstruction* instr) {
DCHECK(instr->IsGap());
return reinterpret_cast<LGap*>(instr);
@@ -441,11 +437,11 @@ class LGap : public LTemplateInstruction<0, 0, 0> {
};
-class LInstructionGap FINAL : public LGap {
+class LInstructionGap final : public LGap {
public:
explicit LInstructionGap(HBasicBlock* block) : LGap(block) { }
- bool HasInterestingComment(LCodeGen* gen) const OVERRIDE {
+ bool HasInterestingComment(LCodeGen* gen) const override {
return !IsRedundant();
}
@@ -453,7 +449,7 @@ class LInstructionGap FINAL : public LGap {
};
-class LDrop FINAL : public LTemplateInstruction<0, 0, 0> {
+class LDrop final : public LTemplateInstruction<0, 0, 0> {
public:
explicit LDrop(int count) : count_(count) { }
@@ -466,14 +462,14 @@ class LDrop FINAL : public LTemplateInstruction<0, 0, 0> {
};
-class LDummy FINAL : public LTemplateInstruction<1, 0, 0> {
+class LDummy final : public LTemplateInstruction<1, 0, 0> {
public:
LDummy() {}
DECLARE_CONCRETE_INSTRUCTION(Dummy, "dummy")
};
-class LDummyUse FINAL : public LTemplateInstruction<1, 1, 0> {
+class LDummyUse final : public LTemplateInstruction<1, 1, 0> {
public:
explicit LDummyUse(LOperand* value) {
inputs_[0] = value;
@@ -482,14 +478,14 @@ class LDummyUse FINAL : public LTemplateInstruction<1, 1, 0> {
};
-class LGoto FINAL : public LTemplateInstruction<0, 0, 0> {
+class LGoto final : public LTemplateInstruction<0, 0, 0> {
public:
explicit LGoto(HBasicBlock* block) : block_(block) { }
- bool HasInterestingComment(LCodeGen* gen) const OVERRIDE;
+ bool HasInterestingComment(LCodeGen* gen) const override;
DECLARE_CONCRETE_INSTRUCTION(Goto, "goto")
- void PrintDataTo(StringStream* stream) OVERRIDE;
- bool IsControl() const OVERRIDE { return true; }
+ void PrintDataTo(StringStream* stream) override;
+ bool IsControl() const override { return true; }
int block_id() const { return block_->block_id(); }
@@ -498,7 +494,7 @@ class LGoto FINAL : public LTemplateInstruction<0, 0, 0> {
};
-class LLazyBailout FINAL : public LTemplateInstruction<0, 0, 0> {
+class LLazyBailout final : public LTemplateInstruction<0, 0, 0> {
public:
LLazyBailout() : gap_instructions_size_(0) { }
@@ -514,15 +510,15 @@ class LLazyBailout FINAL : public LTemplateInstruction<0, 0, 0> {
};
-class LLabel FINAL : public LGap {
+class LLabel final : public LGap {
public:
explicit LLabel(HBasicBlock* block)
: LGap(block), replacement_(NULL) { }
- bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; }
+ bool HasInterestingComment(LCodeGen* gen) const override { return false; }
DECLARE_CONCRETE_INSTRUCTION(Label, "label")
- void PrintDataTo(StringStream* stream) OVERRIDE;
+ void PrintDataTo(StringStream* stream) override;
int block_id() const { return block()->block_id(); }
bool is_loop_header() const { return block()->IsLoopHeader(); }
@@ -538,16 +534,16 @@ class LLabel FINAL : public LGap {
};
-class LOsrEntry FINAL : public LTemplateInstruction<0, 0, 0> {
+class LOsrEntry final : public LTemplateInstruction<0, 0, 0> {
public:
LOsrEntry() {}
- bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; }
+ bool HasInterestingComment(LCodeGen* gen) const override { return false; }
DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr-entry")
};
-class LAccessArgumentsAt FINAL : public LTemplateInstruction<1, 3, 0> {
+class LAccessArgumentsAt final : public LTemplateInstruction<1, 3, 0> {
public:
LAccessArgumentsAt(LOperand* arguments,
LOperand* length,
@@ -563,11 +559,11 @@ class LAccessArgumentsAt FINAL : public LTemplateInstruction<1, 3, 0> {
LOperand* length() { return inputs_[1]; }
LOperand* index() { return inputs_[2]; }
- void PrintDataTo(StringStream* stream) OVERRIDE;
+ void PrintDataTo(StringStream* stream) override;
};
-class LAddE FINAL : public LTemplateInstruction<1, 2, 0> {
+class LAddE final : public LTemplateInstruction<1, 2, 0> {
public:
LAddE(LOperand* left, LOperand* right) {
inputs_[0] = left;
@@ -582,7 +578,7 @@ class LAddE FINAL : public LTemplateInstruction<1, 2, 0> {
};
-class LAddI FINAL : public LTemplateInstruction<1, 2, 0> {
+class LAddI final : public LTemplateInstruction<1, 2, 0> {
public:
LAddI(LOperand* left, LOperand* right)
: shift_(NO_SHIFT), shift_amount_(0) {
@@ -611,7 +607,7 @@ class LAddI FINAL : public LTemplateInstruction<1, 2, 0> {
};
-class LAddS FINAL : public LTemplateInstruction<1, 2, 0> {
+class LAddS final : public LTemplateInstruction<1, 2, 0> {
public:
LAddS(LOperand* left, LOperand* right) {
inputs_[0] = left;
@@ -626,7 +622,7 @@ class LAddS FINAL : public LTemplateInstruction<1, 2, 0> {
};
-class LAllocate FINAL : public LTemplateInstruction<1, 2, 3> {
+class LAllocate final : public LTemplateInstruction<1, 2, 3> {
public:
LAllocate(LOperand* context,
LOperand* size,
@@ -651,7 +647,7 @@ class LAllocate FINAL : public LTemplateInstruction<1, 2, 3> {
};
-class LApplyArguments FINAL : public LTemplateInstruction<1, 4, 0> {
+class LApplyArguments final : public LTemplateInstruction<1, 4, 0> {
public:
LApplyArguments(LOperand* function,
LOperand* receiver,
@@ -672,7 +668,7 @@ class LApplyArguments FINAL : public LTemplateInstruction<1, 4, 0> {
};
-class LArgumentsElements FINAL : public LTemplateInstruction<1, 0, 1> {
+class LArgumentsElements final : public LTemplateInstruction<1, 0, 1> {
public:
explicit LArgumentsElements(LOperand* temp) {
temps_[0] = temp;
@@ -685,7 +681,7 @@ class LArgumentsElements FINAL : public LTemplateInstruction<1, 0, 1> {
};
-class LArgumentsLength FINAL : public LTemplateInstruction<1, 1, 0> {
+class LArgumentsLength final : public LTemplateInstruction<1, 1, 0> {
public:
explicit LArgumentsLength(LOperand* elements) {
inputs_[0] = elements;
@@ -697,7 +693,7 @@ class LArgumentsLength FINAL : public LTemplateInstruction<1, 1, 0> {
};
-class LArithmeticD FINAL : public LTemplateInstruction<1, 2, 0> {
+class LArithmeticD final : public LTemplateInstruction<1, 2, 0> {
public:
LArithmeticD(Token::Value op,
LOperand* left,
@@ -711,16 +707,16 @@ class LArithmeticD FINAL : public LTemplateInstruction<1, 2, 0> {
LOperand* left() { return inputs_[0]; }
LOperand* right() { return inputs_[1]; }
- Opcode opcode() const OVERRIDE { return LInstruction::kArithmeticD; }
- void CompileToNative(LCodeGen* generator) OVERRIDE;
- const char* Mnemonic() const OVERRIDE;
+ Opcode opcode() const override { return LInstruction::kArithmeticD; }
+ void CompileToNative(LCodeGen* generator) override;
+ const char* Mnemonic() const override;
private:
Token::Value op_;
};
-class LArithmeticT FINAL : public LTemplateInstruction<1, 3, 0> {
+class LArithmeticT final : public LTemplateInstruction<1, 3, 0> {
public:
LArithmeticT(Token::Value op,
LOperand* context,
@@ -737,16 +733,20 @@ class LArithmeticT FINAL : public LTemplateInstruction<1, 3, 0> {
LOperand* right() { return inputs_[2]; }
Token::Value op() const { return op_; }
- Opcode opcode() const OVERRIDE { return LInstruction::kArithmeticT; }
- void CompileToNative(LCodeGen* generator) OVERRIDE;
- const char* Mnemonic() const OVERRIDE;
+ Opcode opcode() const override { return LInstruction::kArithmeticT; }
+ void CompileToNative(LCodeGen* generator) override;
+ const char* Mnemonic() const override;
+
+ DECLARE_HYDROGEN_ACCESSOR(BinaryOperation)
+
+ LanguageMode language_mode() { return hydrogen()->language_mode(); }
private:
Token::Value op_;
};
-class LBoundsCheck FINAL : public LTemplateInstruction<0, 2, 0> {
+class LBoundsCheck final : public LTemplateInstruction<0, 2, 0> {
public:
explicit LBoundsCheck(LOperand* index, LOperand* length) {
inputs_[0] = index;
@@ -761,7 +761,7 @@ class LBoundsCheck FINAL : public LTemplateInstruction<0, 2, 0> {
};
-class LBitI FINAL : public LTemplateInstruction<1, 2, 0> {
+class LBitI final : public LTemplateInstruction<1, 2, 0> {
public:
LBitI(LOperand* left, LOperand* right)
: shift_(NO_SHIFT), shift_amount_(0) {
@@ -792,7 +792,7 @@ class LBitI FINAL : public LTemplateInstruction<1, 2, 0> {
};
-class LBitS FINAL : public LTemplateInstruction<1, 2, 0> {
+class LBitS final : public LTemplateInstruction<1, 2, 0> {
public:
LBitS(LOperand* left, LOperand* right) {
inputs_[0] = left;
@@ -809,7 +809,7 @@ class LBitS FINAL : public LTemplateInstruction<1, 2, 0> {
};
-class LBranch FINAL : public LControlInstruction<1, 2> {
+class LBranch final : public LControlInstruction<1, 2> {
public:
explicit LBranch(LOperand* value, LOperand *temp1, LOperand *temp2) {
inputs_[0] = value;
@@ -824,11 +824,11 @@ class LBranch FINAL : public LControlInstruction<1, 2> {
DECLARE_CONCRETE_INSTRUCTION(Branch, "branch")
DECLARE_HYDROGEN_ACCESSOR(Branch)
- void PrintDataTo(StringStream* stream) OVERRIDE;
+ void PrintDataTo(StringStream* stream) override;
};
-class LCallJSFunction FINAL : public LTemplateInstruction<1, 1, 0> {
+class LCallJSFunction final : public LTemplateInstruction<1, 1, 0> {
public:
explicit LCallJSFunction(LOperand* function) {
inputs_[0] = function;
@@ -839,13 +839,13 @@ class LCallJSFunction FINAL : public LTemplateInstruction<1, 1, 0> {
DECLARE_CONCRETE_INSTRUCTION(CallJSFunction, "call-js-function")
DECLARE_HYDROGEN_ACCESSOR(CallJSFunction)
- void PrintDataTo(StringStream* stream) OVERRIDE;
+ void PrintDataTo(StringStream* stream) override;
int arity() const { return hydrogen()->argument_count() - 1; }
};
-class LCallFunction FINAL : public LTemplateInstruction<1, 2, 2> {
+class LCallFunction final : public LTemplateInstruction<1, 2, 2> {
public:
LCallFunction(LOperand* context, LOperand* function, LOperand* slot,
LOperand* vector) {
@@ -864,11 +864,11 @@ class LCallFunction FINAL : public LTemplateInstruction<1, 2, 2> {
DECLARE_HYDROGEN_ACCESSOR(CallFunction)
int arity() const { return hydrogen()->argument_count() - 1; }
- void PrintDataTo(StringStream* stream) OVERRIDE;
+ void PrintDataTo(StringStream* stream) override;
};
-class LCallNew FINAL : public LTemplateInstruction<1, 2, 0> {
+class LCallNew final : public LTemplateInstruction<1, 2, 0> {
public:
LCallNew(LOperand* context, LOperand* constructor) {
inputs_[0] = context;
@@ -881,13 +881,13 @@ class LCallNew FINAL : public LTemplateInstruction<1, 2, 0> {
DECLARE_CONCRETE_INSTRUCTION(CallNew, "call-new")
DECLARE_HYDROGEN_ACCESSOR(CallNew)
- void PrintDataTo(StringStream* stream) OVERRIDE;
+ void PrintDataTo(StringStream* stream) override;
int arity() const { return hydrogen()->argument_count() - 1; }
};
-class LCallNewArray FINAL : public LTemplateInstruction<1, 2, 0> {
+class LCallNewArray final : public LTemplateInstruction<1, 2, 0> {
public:
LCallNewArray(LOperand* context, LOperand* constructor) {
inputs_[0] = context;
@@ -900,13 +900,13 @@ class LCallNewArray FINAL : public LTemplateInstruction<1, 2, 0> {
DECLARE_CONCRETE_INSTRUCTION(CallNewArray, "call-new-array")
DECLARE_HYDROGEN_ACCESSOR(CallNewArray)
- void PrintDataTo(StringStream* stream) OVERRIDE;
+ void PrintDataTo(StringStream* stream) override;
int arity() const { return hydrogen()->argument_count() - 1; }
};
-class LCallRuntime FINAL : public LTemplateInstruction<1, 1, 0> {
+class LCallRuntime final : public LTemplateInstruction<1, 1, 0> {
public:
explicit LCallRuntime(LOperand* context) {
inputs_[0] = context;
@@ -917,7 +917,7 @@ class LCallRuntime FINAL : public LTemplateInstruction<1, 1, 0> {
DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime")
DECLARE_HYDROGEN_ACCESSOR(CallRuntime)
- bool ClobbersDoubleRegisters(Isolate* isolate) const OVERRIDE {
+ bool ClobbersDoubleRegisters(Isolate* isolate) const override {
return save_doubles() == kDontSaveFPRegs;
}
@@ -927,7 +927,7 @@ class LCallRuntime FINAL : public LTemplateInstruction<1, 1, 0> {
};
-class LCallStub FINAL : public LTemplateInstruction<1, 1, 0> {
+class LCallStub final : public LTemplateInstruction<1, 1, 0> {
public:
explicit LCallStub(LOperand* context) {
inputs_[0] = context;
@@ -940,7 +940,20 @@ class LCallStub FINAL : public LTemplateInstruction<1, 1, 0> {
};
-class LCheckInstanceType FINAL : public LTemplateInstruction<0, 1, 1> {
+class LCheckArrayBufferNotNeutered final
+ : public LTemplateInstruction<0, 1, 0> {
+ public:
+ explicit LCheckArrayBufferNotNeutered(LOperand* view) { inputs_[0] = view; }
+
+ LOperand* view() { return inputs_[0]; }
+
+ DECLARE_CONCRETE_INSTRUCTION(CheckArrayBufferNotNeutered,
+ "check-array-buffer-not-neutered")
+ DECLARE_HYDROGEN_ACCESSOR(CheckArrayBufferNotNeutered)
+};
+
+
+class LCheckInstanceType final : public LTemplateInstruction<0, 1, 1> {
public:
explicit LCheckInstanceType(LOperand* value, LOperand* temp) {
inputs_[0] = value;
@@ -955,7 +968,7 @@ class LCheckInstanceType FINAL : public LTemplateInstruction<0, 1, 1> {
};
-class LCheckMaps FINAL : public LTemplateInstruction<0, 1, 1> {
+class LCheckMaps final : public LTemplateInstruction<0, 1, 1> {
public:
explicit LCheckMaps(LOperand* value = NULL, LOperand* temp = NULL) {
inputs_[0] = value;
@@ -970,7 +983,7 @@ class LCheckMaps FINAL : public LTemplateInstruction<0, 1, 1> {
};
-class LCheckNonSmi FINAL : public LTemplateInstruction<0, 1, 0> {
+class LCheckNonSmi final : public LTemplateInstruction<0, 1, 0> {
public:
explicit LCheckNonSmi(LOperand* value) {
inputs_[0] = value;
@@ -983,7 +996,7 @@ class LCheckNonSmi FINAL : public LTemplateInstruction<0, 1, 0> {
};
-class LCheckSmi FINAL : public LTemplateInstruction<1, 1, 0> {
+class LCheckSmi final : public LTemplateInstruction<1, 1, 0> {
public:
explicit LCheckSmi(LOperand* value) {
inputs_[0] = value;
@@ -995,7 +1008,7 @@ class LCheckSmi FINAL : public LTemplateInstruction<1, 1, 0> {
};
-class LCheckValue FINAL : public LTemplateInstruction<0, 1, 0> {
+class LCheckValue final : public LTemplateInstruction<0, 1, 0> {
public:
explicit LCheckValue(LOperand* value) {
inputs_[0] = value;
@@ -1008,7 +1021,7 @@ class LCheckValue FINAL : public LTemplateInstruction<0, 1, 0> {
};
-class LClampDToUint8 FINAL : public LTemplateInstruction<1, 1, 0> {
+class LClampDToUint8 final : public LTemplateInstruction<1, 1, 0> {
public:
explicit LClampDToUint8(LOperand* unclamped) {
inputs_[0] = unclamped;
@@ -1020,7 +1033,7 @@ class LClampDToUint8 FINAL : public LTemplateInstruction<1, 1, 0> {
};
-class LClampIToUint8 FINAL : public LTemplateInstruction<1, 1, 0> {
+class LClampIToUint8 final : public LTemplateInstruction<1, 1, 0> {
public:
explicit LClampIToUint8(LOperand* unclamped) {
inputs_[0] = unclamped;
@@ -1032,7 +1045,7 @@ class LClampIToUint8 FINAL : public LTemplateInstruction<1, 1, 0> {
};
-class LClampTToUint8 FINAL : public LTemplateInstruction<1, 1, 1> {
+class LClampTToUint8 final : public LTemplateInstruction<1, 1, 1> {
public:
LClampTToUint8(LOperand* unclamped, LOperand* temp1) {
inputs_[0] = unclamped;
@@ -1046,7 +1059,7 @@ class LClampTToUint8 FINAL : public LTemplateInstruction<1, 1, 1> {
};
-class LDoubleBits FINAL : public LTemplateInstruction<1, 1, 0> {
+class LDoubleBits final : public LTemplateInstruction<1, 1, 0> {
public:
explicit LDoubleBits(LOperand* value) {
inputs_[0] = value;
@@ -1059,7 +1072,7 @@ class LDoubleBits FINAL : public LTemplateInstruction<1, 1, 0> {
};
-class LConstructDouble FINAL : public LTemplateInstruction<1, 2, 0> {
+class LConstructDouble final : public LTemplateInstruction<1, 2, 0> {
public:
LConstructDouble(LOperand* hi, LOperand* lo) {
inputs_[0] = hi;
@@ -1073,7 +1086,7 @@ class LConstructDouble FINAL : public LTemplateInstruction<1, 2, 0> {
};
-class LClassOfTestAndBranch FINAL : public LControlInstruction<1, 2> {
+class LClassOfTestAndBranch final : public LControlInstruction<1, 2> {
public:
LClassOfTestAndBranch(LOperand* value, LOperand* temp1, LOperand* temp2) {
inputs_[0] = value;
@@ -1089,11 +1102,11 @@ class LClassOfTestAndBranch FINAL : public LControlInstruction<1, 2> {
"class-of-test-and-branch")
DECLARE_HYDROGEN_ACCESSOR(ClassOfTestAndBranch)
- void PrintDataTo(StringStream* stream) OVERRIDE;
+ void PrintDataTo(StringStream* stream) override;
};
-class LCmpHoleAndBranchD FINAL : public LControlInstruction<1, 1> {
+class LCmpHoleAndBranchD final : public LControlInstruction<1, 1> {
public:
explicit LCmpHoleAndBranchD(LOperand* object, LOperand* temp) {
inputs_[0] = object;
@@ -1108,7 +1121,7 @@ class LCmpHoleAndBranchD FINAL : public LControlInstruction<1, 1> {
};
-class LCmpHoleAndBranchT FINAL : public LControlInstruction<1, 0> {
+class LCmpHoleAndBranchT final : public LControlInstruction<1, 0> {
public:
explicit LCmpHoleAndBranchT(LOperand* object) {
inputs_[0] = object;
@@ -1121,7 +1134,7 @@ class LCmpHoleAndBranchT FINAL : public LControlInstruction<1, 0> {
};
-class LCmpMapAndBranch FINAL : public LControlInstruction<1, 1> {
+class LCmpMapAndBranch final : public LControlInstruction<1, 1> {
public:
LCmpMapAndBranch(LOperand* value, LOperand* temp) {
inputs_[0] = value;
@@ -1138,7 +1151,7 @@ class LCmpMapAndBranch FINAL : public LControlInstruction<1, 1> {
};
-class LCmpObjectEqAndBranch FINAL : public LControlInstruction<2, 0> {
+class LCmpObjectEqAndBranch final : public LControlInstruction<2, 0> {
public:
LCmpObjectEqAndBranch(LOperand* left, LOperand* right) {
inputs_[0] = left;
@@ -1153,7 +1166,7 @@ class LCmpObjectEqAndBranch FINAL : public LControlInstruction<2, 0> {
};
-class LCmpT FINAL : public LTemplateInstruction<1, 3, 0> {
+class LCmpT final : public LTemplateInstruction<1, 3, 0> {
public:
LCmpT(LOperand* context, LOperand* left, LOperand* right) {
inputs_[0] = context;
@@ -1172,7 +1185,7 @@ class LCmpT FINAL : public LTemplateInstruction<1, 3, 0> {
};
-class LCompareMinusZeroAndBranch FINAL : public LControlInstruction<1, 1> {
+class LCompareMinusZeroAndBranch final : public LControlInstruction<1, 1> {
public:
LCompareMinusZeroAndBranch(LOperand* value, LOperand* temp) {
inputs_[0] = value;
@@ -1188,7 +1201,7 @@ class LCompareMinusZeroAndBranch FINAL : public LControlInstruction<1, 1> {
};
-class LCompareNumericAndBranch FINAL : public LControlInstruction<2, 0> {
+class LCompareNumericAndBranch final : public LControlInstruction<2, 0> {
public:
LCompareNumericAndBranch(LOperand* left, LOperand* right) {
inputs_[0] = left;
@@ -1207,11 +1220,11 @@ class LCompareNumericAndBranch FINAL : public LControlInstruction<2, 0> {
return hydrogen()->representation().IsDouble();
}
- void PrintDataTo(StringStream* stream) OVERRIDE;
+ void PrintDataTo(StringStream* stream) override;
};
-class LConstantD FINAL : public LTemplateInstruction<1, 0, 0> {
+class LConstantD final : public LTemplateInstruction<1, 0, 0> {
public:
DECLARE_CONCRETE_INSTRUCTION(ConstantD, "constant-d")
DECLARE_HYDROGEN_ACCESSOR(Constant)
@@ -1220,7 +1233,7 @@ class LConstantD FINAL : public LTemplateInstruction<1, 0, 0> {
};
-class LConstantE FINAL : public LTemplateInstruction<1, 0, 0> {
+class LConstantE final : public LTemplateInstruction<1, 0, 0> {
public:
DECLARE_CONCRETE_INSTRUCTION(ConstantE, "constant-e")
DECLARE_HYDROGEN_ACCESSOR(Constant)
@@ -1231,7 +1244,7 @@ class LConstantE FINAL : public LTemplateInstruction<1, 0, 0> {
};
-class LConstantI FINAL : public LTemplateInstruction<1, 0, 0> {
+class LConstantI final : public LTemplateInstruction<1, 0, 0> {
public:
DECLARE_CONCRETE_INSTRUCTION(ConstantI, "constant-i")
DECLARE_HYDROGEN_ACCESSOR(Constant)
@@ -1240,7 +1253,7 @@ class LConstantI FINAL : public LTemplateInstruction<1, 0, 0> {
};
-class LConstantS FINAL : public LTemplateInstruction<1, 0, 0> {
+class LConstantS final : public LTemplateInstruction<1, 0, 0> {
public:
DECLARE_CONCRETE_INSTRUCTION(ConstantS, "constant-s")
DECLARE_HYDROGEN_ACCESSOR(Constant)
@@ -1249,7 +1262,7 @@ class LConstantS FINAL : public LTemplateInstruction<1, 0, 0> {
};
-class LConstantT FINAL : public LTemplateInstruction<1, 0, 0> {
+class LConstantT final : public LTemplateInstruction<1, 0, 0> {
public:
DECLARE_CONCRETE_INSTRUCTION(ConstantT, "constant-t")
DECLARE_HYDROGEN_ACCESSOR(Constant)
@@ -1260,14 +1273,14 @@ class LConstantT FINAL : public LTemplateInstruction<1, 0, 0> {
};
-class LContext FINAL : public LTemplateInstruction<1, 0, 0> {
+class LContext final : public LTemplateInstruction<1, 0, 0> {
public:
DECLARE_CONCRETE_INSTRUCTION(Context, "context")
DECLARE_HYDROGEN_ACCESSOR(Context)
};
-class LDateField FINAL : public LTemplateInstruction<1, 1, 0> {
+class LDateField final : public LTemplateInstruction<1, 1, 0> {
public:
LDateField(LOperand* date, Smi* index) : index_(index) {
inputs_[0] = date;
@@ -1284,13 +1297,13 @@ class LDateField FINAL : public LTemplateInstruction<1, 1, 0> {
};
-class LDebugBreak FINAL : public LTemplateInstruction<0, 0, 0> {
+class LDebugBreak final : public LTemplateInstruction<0, 0, 0> {
public:
DECLARE_CONCRETE_INSTRUCTION(DebugBreak, "break")
};
-class LDeclareGlobals FINAL : public LTemplateInstruction<0, 1, 0> {
+class LDeclareGlobals final : public LTemplateInstruction<0, 1, 0> {
public:
explicit LDeclareGlobals(LOperand* context) {
inputs_[0] = context;
@@ -1303,15 +1316,15 @@ class LDeclareGlobals FINAL : public LTemplateInstruction<0, 1, 0> {
};
-class LDeoptimize FINAL : public LTemplateInstruction<0, 0, 0> {
+class LDeoptimize final : public LTemplateInstruction<0, 0, 0> {
public:
- bool IsControl() const OVERRIDE { return true; }
+ bool IsControl() const override { return true; }
DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize")
DECLARE_HYDROGEN_ACCESSOR(Deoptimize)
};
-class LDivByPowerOf2I FINAL : public LTemplateInstruction<1, 1, 0> {
+class LDivByPowerOf2I final : public LTemplateInstruction<1, 1, 0> {
public:
LDivByPowerOf2I(LOperand* dividend, int32_t divisor) {
inputs_[0] = dividend;
@@ -1329,7 +1342,7 @@ class LDivByPowerOf2I FINAL : public LTemplateInstruction<1, 1, 0> {
};
-class LDivByConstI FINAL : public LTemplateInstruction<1, 1, 1> {
+class LDivByConstI final : public LTemplateInstruction<1, 1, 1> {
public:
LDivByConstI(LOperand* dividend, int32_t divisor, LOperand* temp) {
inputs_[0] = dividend;
@@ -1349,7 +1362,7 @@ class LDivByConstI FINAL : public LTemplateInstruction<1, 1, 1> {
};
-class LDivI FINAL : public LTemplateInstruction<1, 2, 1> {
+class LDivI final : public LTemplateInstruction<1, 2, 1> {
public:
LDivI(LOperand* dividend, LOperand* divisor, LOperand* temp) {
inputs_[0] = dividend;
@@ -1366,7 +1379,7 @@ class LDivI FINAL : public LTemplateInstruction<1, 2, 1> {
};
-class LDoubleToIntOrSmi FINAL : public LTemplateInstruction<1, 1, 0> {
+class LDoubleToIntOrSmi final : public LTemplateInstruction<1, 1, 0> {
public:
explicit LDoubleToIntOrSmi(LOperand* value) {
inputs_[0] = value;
@@ -1381,7 +1394,7 @@ class LDoubleToIntOrSmi FINAL : public LTemplateInstruction<1, 1, 0> {
};
-class LForInCacheArray FINAL : public LTemplateInstruction<1, 1, 0> {
+class LForInCacheArray final : public LTemplateInstruction<1, 1, 0> {
public:
explicit LForInCacheArray(LOperand* map) {
inputs_[0] = map;
@@ -1397,7 +1410,7 @@ class LForInCacheArray FINAL : public LTemplateInstruction<1, 1, 0> {
};
-class LForInPrepareMap FINAL : public LTemplateInstruction<1, 2, 0> {
+class LForInPrepareMap final : public LTemplateInstruction<1, 2, 0> {
public:
LForInPrepareMap(LOperand* context, LOperand* object) {
inputs_[0] = context;
@@ -1411,7 +1424,7 @@ class LForInPrepareMap FINAL : public LTemplateInstruction<1, 2, 0> {
};
-class LGetCachedArrayIndex FINAL : public LTemplateInstruction<1, 1, 0> {
+class LGetCachedArrayIndex final : public LTemplateInstruction<1, 1, 0> {
public:
explicit LGetCachedArrayIndex(LOperand* value) {
inputs_[0] = value;
@@ -1424,8 +1437,7 @@ class LGetCachedArrayIndex FINAL : public LTemplateInstruction<1, 1, 0> {
};
-class LHasCachedArrayIndexAndBranch FINAL
- : public LControlInstruction<1, 1> {
+class LHasCachedArrayIndexAndBranch final : public LControlInstruction<1, 1> {
public:
LHasCachedArrayIndexAndBranch(LOperand* value, LOperand* temp) {
inputs_[0] = value;
@@ -1439,11 +1451,11 @@ class LHasCachedArrayIndexAndBranch FINAL
"has-cached-array-index-and-branch")
DECLARE_HYDROGEN_ACCESSOR(HasCachedArrayIndexAndBranch)
- void PrintDataTo(StringStream* stream) OVERRIDE;
+ void PrintDataTo(StringStream* stream) override;
};
-class LHasInstanceTypeAndBranch FINAL : public LControlInstruction<1, 1> {
+class LHasInstanceTypeAndBranch final : public LControlInstruction<1, 1> {
public:
LHasInstanceTypeAndBranch(LOperand* value, LOperand* temp) {
inputs_[0] = value;
@@ -1457,11 +1469,11 @@ class LHasInstanceTypeAndBranch FINAL : public LControlInstruction<1, 1> {
"has-instance-type-and-branch")
DECLARE_HYDROGEN_ACCESSOR(HasInstanceTypeAndBranch)
- void PrintDataTo(StringStream* stream) OVERRIDE;
+ void PrintDataTo(StringStream* stream) override;
};
-class LInnerAllocatedObject FINAL : public LTemplateInstruction<1, 2, 0> {
+class LInnerAllocatedObject final : public LTemplateInstruction<1, 2, 0> {
public:
LInnerAllocatedObject(LOperand* base_object, LOperand* offset) {
inputs_[0] = base_object;
@@ -1471,13 +1483,13 @@ class LInnerAllocatedObject FINAL : public LTemplateInstruction<1, 2, 0> {
LOperand* base_object() const { return inputs_[0]; }
LOperand* offset() const { return inputs_[1]; }
- void PrintDataTo(StringStream* stream) OVERRIDE;
+ void PrintDataTo(StringStream* stream) override;
DECLARE_CONCRETE_INSTRUCTION(InnerAllocatedObject, "inner-allocated-object")
};
-class LInstanceOf FINAL : public LTemplateInstruction<1, 3, 0> {
+class LInstanceOf final : public LTemplateInstruction<1, 3, 0> {
public:
LInstanceOf(LOperand* context, LOperand* left, LOperand* right) {
inputs_[0] = context;
@@ -1493,7 +1505,7 @@ class LInstanceOf FINAL : public LTemplateInstruction<1, 3, 0> {
};
-class LInstanceOfKnownGlobal FINAL : public LTemplateInstruction<1, 2, 0> {
+class LInstanceOfKnownGlobal final : public LTemplateInstruction<1, 2, 0> {
public:
LInstanceOfKnownGlobal(LOperand* context, LOperand* value) {
inputs_[0] = context;
@@ -1512,7 +1524,7 @@ class LInstanceOfKnownGlobal FINAL : public LTemplateInstruction<1, 2, 0> {
return lazy_deopt_env_;
}
virtual void SetDeferredLazyDeoptimizationEnvironment(
- LEnvironment* env) OVERRIDE {
+ LEnvironment* env) override {
lazy_deopt_env_ = env;
}
@@ -1521,7 +1533,7 @@ class LInstanceOfKnownGlobal FINAL : public LTemplateInstruction<1, 2, 0> {
};
-class LInteger32ToDouble FINAL : public LTemplateInstruction<1, 1, 0> {
+class LInteger32ToDouble final : public LTemplateInstruction<1, 1, 0> {
public:
explicit LInteger32ToDouble(LOperand* value) {
inputs_[0] = value;
@@ -1533,7 +1545,7 @@ class LInteger32ToDouble FINAL : public LTemplateInstruction<1, 1, 0> {
};
-class LCallWithDescriptor FINAL : public LTemplateResultInstruction<1> {
+class LCallWithDescriptor final : public LTemplateResultInstruction<1> {
public:
LCallWithDescriptor(CallInterfaceDescriptor descriptor,
const ZoneList<LOperand*>& operands, Zone* zone)
@@ -1552,7 +1564,7 @@ class LCallWithDescriptor FINAL : public LTemplateResultInstruction<1> {
private:
DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor")
- void PrintDataTo(StringStream* stream) OVERRIDE;
+ void PrintDataTo(StringStream* stream) override;
int arity() const { return hydrogen()->argument_count() - 1; }
@@ -1560,15 +1572,15 @@ class LCallWithDescriptor FINAL : public LTemplateResultInstruction<1> {
ZoneList<LOperand*> inputs_;
// Iterator support.
- int InputCount() FINAL { return inputs_.length(); }
- LOperand* InputAt(int i) FINAL { return inputs_[i]; }
+ int InputCount() final { return inputs_.length(); }
+ LOperand* InputAt(int i) final { return inputs_[i]; }
- int TempCount() FINAL { return 0; }
- LOperand* TempAt(int i) FINAL { return NULL; }
+ int TempCount() final { return 0; }
+ LOperand* TempAt(int i) final { return NULL; }
};
-class LInvokeFunction FINAL : public LTemplateInstruction<1, 2, 0> {
+class LInvokeFunction final : public LTemplateInstruction<1, 2, 0> {
public:
LInvokeFunction(LOperand* context, LOperand* function) {
inputs_[0] = context;
@@ -1581,13 +1593,13 @@ class LInvokeFunction FINAL : public LTemplateInstruction<1, 2, 0> {
DECLARE_CONCRETE_INSTRUCTION(InvokeFunction, "invoke-function")
DECLARE_HYDROGEN_ACCESSOR(InvokeFunction)
- void PrintDataTo(StringStream* stream) OVERRIDE;
+ void PrintDataTo(StringStream* stream) override;
int arity() const { return hydrogen()->argument_count() - 1; }
};
-class LIsConstructCallAndBranch FINAL : public LControlInstruction<0, 2> {
+class LIsConstructCallAndBranch final : public LControlInstruction<0, 2> {
public:
LIsConstructCallAndBranch(LOperand* temp1, LOperand* temp2) {
temps_[0] = temp1;
@@ -1602,7 +1614,7 @@ class LIsConstructCallAndBranch FINAL : public LControlInstruction<0, 2> {
};
-class LIsObjectAndBranch FINAL : public LControlInstruction<1, 2> {
+class LIsObjectAndBranch final : public LControlInstruction<1, 2> {
public:
LIsObjectAndBranch(LOperand* value, LOperand* temp1, LOperand* temp2) {
inputs_[0] = value;
@@ -1617,11 +1629,11 @@ class LIsObjectAndBranch FINAL : public LControlInstruction<1, 2> {
DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch, "is-object-and-branch")
DECLARE_HYDROGEN_ACCESSOR(IsObjectAndBranch)
- void PrintDataTo(StringStream* stream) OVERRIDE;
+ void PrintDataTo(StringStream* stream) override;
};
-class LIsStringAndBranch FINAL : public LControlInstruction<1, 1> {
+class LIsStringAndBranch final : public LControlInstruction<1, 1> {
public:
LIsStringAndBranch(LOperand* value, LOperand* temp) {
inputs_[0] = value;
@@ -1634,11 +1646,11 @@ class LIsStringAndBranch FINAL : public LControlInstruction<1, 1> {
DECLARE_CONCRETE_INSTRUCTION(IsStringAndBranch, "is-string-and-branch")
DECLARE_HYDROGEN_ACCESSOR(IsStringAndBranch)
- void PrintDataTo(StringStream* stream) OVERRIDE;
+ void PrintDataTo(StringStream* stream) override;
};
-class LIsSmiAndBranch FINAL : public LControlInstruction<1, 0> {
+class LIsSmiAndBranch final : public LControlInstruction<1, 0> {
public:
explicit LIsSmiAndBranch(LOperand* value) {
inputs_[0] = value;
@@ -1649,11 +1661,11 @@ class LIsSmiAndBranch FINAL : public LControlInstruction<1, 0> {
DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch, "is-smi-and-branch")
DECLARE_HYDROGEN_ACCESSOR(IsSmiAndBranch)
- void PrintDataTo(StringStream* stream) OVERRIDE;
+ void PrintDataTo(StringStream* stream) override;
};
-class LIsUndetectableAndBranch FINAL : public LControlInstruction<1, 1> {
+class LIsUndetectableAndBranch final : public LControlInstruction<1, 1> {
public:
explicit LIsUndetectableAndBranch(LOperand* value, LOperand* temp) {
inputs_[0] = value;
@@ -1667,11 +1679,11 @@ class LIsUndetectableAndBranch FINAL : public LControlInstruction<1, 1> {
"is-undetectable-and-branch")
DECLARE_HYDROGEN_ACCESSOR(IsUndetectableAndBranch)
- void PrintDataTo(StringStream* stream) OVERRIDE;
+ void PrintDataTo(StringStream* stream) override;
};
-class LLoadContextSlot FINAL : public LTemplateInstruction<1, 1, 0> {
+class LLoadContextSlot final : public LTemplateInstruction<1, 1, 0> {
public:
explicit LLoadContextSlot(LOperand* context) {
inputs_[0] = context;
@@ -1684,11 +1696,11 @@ class LLoadContextSlot FINAL : public LTemplateInstruction<1, 1, 0> {
int slot_index() const { return hydrogen()->slot_index(); }
- void PrintDataTo(StringStream* stream) OVERRIDE;
+ void PrintDataTo(StringStream* stream) override;
};
-class LLoadNamedField FINAL : public LTemplateInstruction<1, 1, 0> {
+class LLoadNamedField final : public LTemplateInstruction<1, 1, 0> {
public:
explicit LLoadNamedField(LOperand* object) {
inputs_[0] = object;
@@ -1701,7 +1713,7 @@ class LLoadNamedField FINAL : public LTemplateInstruction<1, 1, 0> {
};
-class LFunctionLiteral FINAL : public LTemplateInstruction<1, 1, 0> {
+class LFunctionLiteral final : public LTemplateInstruction<1, 1, 0> {
public:
explicit LFunctionLiteral(LOperand* context) {
inputs_[0] = context;
@@ -1714,7 +1726,7 @@ class LFunctionLiteral FINAL : public LTemplateInstruction<1, 1, 0> {
};
-class LLoadFunctionPrototype FINAL : public LTemplateInstruction<1, 1, 1> {
+class LLoadFunctionPrototype final : public LTemplateInstruction<1, 1, 1> {
public:
LLoadFunctionPrototype(LOperand* function, LOperand* temp) {
inputs_[0] = function;
@@ -1729,7 +1741,7 @@ class LLoadFunctionPrototype FINAL : public LTemplateInstruction<1, 1, 1> {
};
-class LLoadGlobalGeneric FINAL : public LTemplateInstruction<1, 2, 1> {
+class LLoadGlobalGeneric final : public LTemplateInstruction<1, 2, 1> {
public:
LLoadGlobalGeneric(LOperand* context, LOperand* global_object,
LOperand* vector) {
@@ -1775,7 +1787,7 @@ class LLoadKeyed : public LTemplateInstruction<1, 2, T> {
uint32_t base_offset() const {
return this->hydrogen()->base_offset();
}
- void PrintDataTo(StringStream* stream) OVERRIDE {
+ void PrintDataTo(StringStream* stream) override {
this->elements()->PrintTo(stream);
stream->Add("[");
this->key()->PrintTo(stream);
@@ -1829,7 +1841,7 @@ class LLoadKeyedFixedDouble: public LLoadKeyed<1> {
};
-class LLoadKeyedGeneric FINAL : public LTemplateInstruction<1, 3, 1> {
+class LLoadKeyedGeneric final : public LTemplateInstruction<1, 3, 1> {
public:
LLoadKeyedGeneric(LOperand* context, LOperand* object, LOperand* key,
LOperand* vector) {
@@ -1849,7 +1861,7 @@ class LLoadKeyedGeneric FINAL : public LTemplateInstruction<1, 3, 1> {
};
-class LLoadNamedGeneric FINAL : public LTemplateInstruction<1, 2, 1> {
+class LLoadNamedGeneric final : public LTemplateInstruction<1, 2, 1> {
public:
LLoadNamedGeneric(LOperand* context, LOperand* object, LOperand* vector) {
inputs_[0] = context;
@@ -1868,7 +1880,7 @@ class LLoadNamedGeneric FINAL : public LTemplateInstruction<1, 2, 1> {
};
-class LLoadRoot FINAL : public LTemplateInstruction<1, 0, 0> {
+class LLoadRoot final : public LTemplateInstruction<1, 0, 0> {
public:
DECLARE_CONCRETE_INSTRUCTION(LoadRoot, "load-root")
DECLARE_HYDROGEN_ACCESSOR(LoadRoot)
@@ -1877,7 +1889,7 @@ class LLoadRoot FINAL : public LTemplateInstruction<1, 0, 0> {
};
-class LMapEnumLength FINAL : public LTemplateInstruction<1, 1, 0> {
+class LMapEnumLength final : public LTemplateInstruction<1, 1, 0> {
public:
explicit LMapEnumLength(LOperand* value) {
inputs_[0] = value;
@@ -1899,13 +1911,13 @@ class LUnaryMathOperation : public LTemplateInstruction<1, 1, T> {
LOperand* value() { return this->inputs_[0]; }
BuiltinFunctionId op() const { return this->hydrogen()->op(); }
- void PrintDataTo(StringStream* stream) OVERRIDE;
+ void PrintDataTo(StringStream* stream) override;
DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation)
};
-class LMathAbs FINAL : public LUnaryMathOperation<0> {
+class LMathAbs final : public LUnaryMathOperation<0> {
public:
explicit LMathAbs(LOperand* value) : LUnaryMathOperation<0>(value) {}
@@ -1935,7 +1947,7 @@ class LMathAbsTagged: public LTemplateInstruction<1, 2, 3> {
};
-class LMathExp FINAL : public LUnaryMathOperation<4> {
+class LMathExp final : public LUnaryMathOperation<4> {
public:
LMathExp(LOperand* value,
LOperand* double_temp1,
@@ -1960,7 +1972,7 @@ class LMathExp FINAL : public LUnaryMathOperation<4> {
// Math.floor with a double result.
-class LMathFloorD FINAL : public LUnaryMathOperation<0> {
+class LMathFloorD final : public LUnaryMathOperation<0> {
public:
explicit LMathFloorD(LOperand* value) : LUnaryMathOperation<0>(value) { }
DECLARE_CONCRETE_INSTRUCTION(MathFloorD, "math-floor-d")
@@ -1968,14 +1980,14 @@ class LMathFloorD FINAL : public LUnaryMathOperation<0> {
// Math.floor with an integer result.
-class LMathFloorI FINAL : public LUnaryMathOperation<0> {
+class LMathFloorI final : public LUnaryMathOperation<0> {
public:
explicit LMathFloorI(LOperand* value) : LUnaryMathOperation<0>(value) { }
DECLARE_CONCRETE_INSTRUCTION(MathFloorI, "math-floor-i")
};
-class LFlooringDivByPowerOf2I FINAL : public LTemplateInstruction<1, 1, 0> {
+class LFlooringDivByPowerOf2I final : public LTemplateInstruction<1, 1, 0> {
public:
LFlooringDivByPowerOf2I(LOperand* dividend, int32_t divisor) {
inputs_[0] = dividend;
@@ -1994,7 +2006,7 @@ class LFlooringDivByPowerOf2I FINAL : public LTemplateInstruction<1, 1, 0> {
};
-class LFlooringDivByConstI FINAL : public LTemplateInstruction<1, 1, 2> {
+class LFlooringDivByConstI final : public LTemplateInstruction<1, 1, 2> {
public:
LFlooringDivByConstI(LOperand* dividend, int32_t divisor, LOperand* temp) {
inputs_[0] = dividend;
@@ -2014,7 +2026,7 @@ class LFlooringDivByConstI FINAL : public LTemplateInstruction<1, 1, 2> {
};
-class LFlooringDivI FINAL : public LTemplateInstruction<1, 2, 1> {
+class LFlooringDivI final : public LTemplateInstruction<1, 2, 1> {
public:
LFlooringDivI(LOperand* dividend, LOperand* divisor, LOperand* temp) {
inputs_[0] = dividend;
@@ -2031,21 +2043,21 @@ class LFlooringDivI FINAL : public LTemplateInstruction<1, 2, 1> {
};
-class LMathLog FINAL : public LUnaryMathOperation<0> {
+class LMathLog final : public LUnaryMathOperation<0> {
public:
explicit LMathLog(LOperand* value) : LUnaryMathOperation<0>(value) { }
DECLARE_CONCRETE_INSTRUCTION(MathLog, "math-log")
};
-class LMathClz32 FINAL : public LUnaryMathOperation<0> {
+class LMathClz32 final : public LUnaryMathOperation<0> {
public:
explicit LMathClz32(LOperand* value) : LUnaryMathOperation<0>(value) { }
DECLARE_CONCRETE_INSTRUCTION(MathClz32, "math-clz32")
};
-class LMathMinMax FINAL : public LTemplateInstruction<1, 2, 0> {
+class LMathMinMax final : public LTemplateInstruction<1, 2, 0> {
public:
LMathMinMax(LOperand* left, LOperand* right) {
inputs_[0] = left;
@@ -2060,7 +2072,7 @@ class LMathMinMax FINAL : public LTemplateInstruction<1, 2, 0> {
};
-class LMathPowHalf FINAL : public LUnaryMathOperation<0> {
+class LMathPowHalf final : public LUnaryMathOperation<0> {
public:
explicit LMathPowHalf(LOperand* value) : LUnaryMathOperation<0>(value) { }
DECLARE_CONCRETE_INSTRUCTION(MathPowHalf, "math-pow-half")
@@ -2068,7 +2080,7 @@ class LMathPowHalf FINAL : public LUnaryMathOperation<0> {
// Math.round with an integer result.
-class LMathRoundD FINAL : public LUnaryMathOperation<0> {
+class LMathRoundD final : public LUnaryMathOperation<0> {
public:
explicit LMathRoundD(LOperand* value)
: LUnaryMathOperation<0>(value) {
@@ -2079,7 +2091,7 @@ class LMathRoundD FINAL : public LUnaryMathOperation<0> {
// Math.round with an integer result.
-class LMathRoundI FINAL : public LUnaryMathOperation<1> {
+class LMathRoundI final : public LUnaryMathOperation<1> {
public:
LMathRoundI(LOperand* value, LOperand* temp1)
: LUnaryMathOperation<1>(value) {
@@ -2092,7 +2104,7 @@ class LMathRoundI FINAL : public LUnaryMathOperation<1> {
};
-class LMathFround FINAL : public LUnaryMathOperation<0> {
+class LMathFround final : public LUnaryMathOperation<0> {
public:
explicit LMathFround(LOperand* value) : LUnaryMathOperation<0>(value) {}
@@ -2100,14 +2112,14 @@ class LMathFround FINAL : public LUnaryMathOperation<0> {
};
-class LMathSqrt FINAL : public LUnaryMathOperation<0> {
+class LMathSqrt final : public LUnaryMathOperation<0> {
public:
explicit LMathSqrt(LOperand* value) : LUnaryMathOperation<0>(value) { }
DECLARE_CONCRETE_INSTRUCTION(MathSqrt, "math-sqrt")
};
-class LModByPowerOf2I FINAL : public LTemplateInstruction<1, 1, 0> {
+class LModByPowerOf2I final : public LTemplateInstruction<1, 1, 0> {
public:
LModByPowerOf2I(LOperand* dividend, int32_t divisor) {
inputs_[0] = dividend;
@@ -2125,7 +2137,7 @@ class LModByPowerOf2I FINAL : public LTemplateInstruction<1, 1, 0> {
};
-class LModByConstI FINAL : public LTemplateInstruction<1, 1, 1> {
+class LModByConstI final : public LTemplateInstruction<1, 1, 1> {
public:
LModByConstI(LOperand* dividend, int32_t divisor, LOperand* temp) {
inputs_[0] = dividend;
@@ -2145,7 +2157,7 @@ class LModByConstI FINAL : public LTemplateInstruction<1, 1, 1> {
};
-class LModI FINAL : public LTemplateInstruction<1, 2, 0> {
+class LModI final : public LTemplateInstruction<1, 2, 0> {
public:
LModI(LOperand* left, LOperand* right) {
inputs_[0] = left;
@@ -2160,7 +2172,7 @@ class LModI FINAL : public LTemplateInstruction<1, 2, 0> {
};
-class LMulConstIS FINAL : public LTemplateInstruction<1, 2, 0> {
+class LMulConstIS final : public LTemplateInstruction<1, 2, 0> {
public:
LMulConstIS(LOperand* left, LConstantOperand* right) {
inputs_[0] = left;
@@ -2175,7 +2187,7 @@ class LMulConstIS FINAL : public LTemplateInstruction<1, 2, 0> {
};
-class LMulI FINAL : public LTemplateInstruction<1, 2, 0> {
+class LMulI final : public LTemplateInstruction<1, 2, 0> {
public:
LMulI(LOperand* left, LOperand* right) {
inputs_[0] = left;
@@ -2190,7 +2202,7 @@ class LMulI FINAL : public LTemplateInstruction<1, 2, 0> {
};
-class LMulS FINAL : public LTemplateInstruction<1, 2, 0> {
+class LMulS final : public LTemplateInstruction<1, 2, 0> {
public:
LMulS(LOperand* left, LOperand* right) {
inputs_[0] = left;
@@ -2205,7 +2217,7 @@ class LMulS FINAL : public LTemplateInstruction<1, 2, 0> {
};
-class LNumberTagD FINAL : public LTemplateInstruction<1, 1, 2> {
+class LNumberTagD final : public LTemplateInstruction<1, 1, 2> {
public:
LNumberTagD(LOperand* value, LOperand* temp1, LOperand* temp2) {
inputs_[0] = value;
@@ -2222,7 +2234,7 @@ class LNumberTagD FINAL : public LTemplateInstruction<1, 1, 2> {
};
-class LNumberTagU FINAL : public LTemplateInstruction<1, 1, 2> {
+class LNumberTagU final : public LTemplateInstruction<1, 1, 2> {
public:
explicit LNumberTagU(LOperand* value,
LOperand* temp1,
@@ -2240,7 +2252,7 @@ class LNumberTagU FINAL : public LTemplateInstruction<1, 1, 2> {
};
-class LNumberUntagD FINAL : public LTemplateInstruction<1, 1, 1> {
+class LNumberUntagD final : public LTemplateInstruction<1, 1, 1> {
public:
LNumberUntagD(LOperand* value, LOperand* temp) {
inputs_[0] = value;
@@ -2256,14 +2268,14 @@ class LNumberUntagD FINAL : public LTemplateInstruction<1, 1, 1> {
};
-class LParameter FINAL : public LTemplateInstruction<1, 0, 0> {
+class LParameter final : public LTemplateInstruction<1, 0, 0> {
public:
- bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; }
+ bool HasInterestingComment(LCodeGen* gen) const override { return false; }
DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter")
};
-class LPower FINAL : public LTemplateInstruction<1, 2, 0> {
+class LPower final : public LTemplateInstruction<1, 2, 0> {
public:
LPower(LOperand* left, LOperand* right) {
inputs_[0] = left;
@@ -2278,7 +2290,7 @@ class LPower FINAL : public LTemplateInstruction<1, 2, 0> {
};
-class LPreparePushArguments FINAL : public LTemplateInstruction<0, 0, 0> {
+class LPreparePushArguments final : public LTemplateInstruction<0, 0, 0> {
public:
explicit LPreparePushArguments(int argc) : argc_(argc) {}
@@ -2291,7 +2303,7 @@ class LPreparePushArguments FINAL : public LTemplateInstruction<0, 0, 0> {
};
-class LPushArguments FINAL : public LTemplateResultInstruction<0> {
+class LPushArguments final : public LTemplateResultInstruction<0> {
public:
explicit LPushArguments(Zone* zone,
int capacity = kRecommendedMaxPushedArgs)
@@ -2317,15 +2329,15 @@ class LPushArguments FINAL : public LTemplateResultInstruction<0> {
private:
// Iterator support.
- int InputCount() FINAL { return inputs_.length(); }
- LOperand* InputAt(int i) FINAL { return inputs_[i]; }
+ int InputCount() final { return inputs_.length(); }
+ LOperand* InputAt(int i) final { return inputs_[i]; }
- int TempCount() FINAL { return 0; }
- LOperand* TempAt(int i) FINAL { return NULL; }
+ int TempCount() final { return 0; }
+ LOperand* TempAt(int i) final { return NULL; }
};
-class LRegExpLiteral FINAL : public LTemplateInstruction<1, 1, 0> {
+class LRegExpLiteral final : public LTemplateInstruction<1, 1, 0> {
public:
explicit LRegExpLiteral(LOperand* context) {
inputs_[0] = context;
@@ -2338,7 +2350,7 @@ class LRegExpLiteral FINAL : public LTemplateInstruction<1, 1, 0> {
};
-class LReturn FINAL : public LTemplateInstruction<0, 3, 0> {
+class LReturn final : public LTemplateInstruction<0, 3, 0> {
public:
LReturn(LOperand* value, LOperand* context, LOperand* parameter_count) {
inputs_[0] = value;
@@ -2361,7 +2373,7 @@ class LReturn FINAL : public LTemplateInstruction<0, 3, 0> {
};
-class LSeqStringGetChar FINAL : public LTemplateInstruction<1, 2, 1> {
+class LSeqStringGetChar final : public LTemplateInstruction<1, 2, 1> {
public:
LSeqStringGetChar(LOperand* string,
LOperand* index,
@@ -2380,7 +2392,7 @@ class LSeqStringGetChar FINAL : public LTemplateInstruction<1, 2, 1> {
};
-class LSeqStringSetChar FINAL : public LTemplateInstruction<1, 4, 1> {
+class LSeqStringSetChar final : public LTemplateInstruction<1, 4, 1> {
public:
LSeqStringSetChar(LOperand* context,
LOperand* string,
@@ -2405,7 +2417,7 @@ class LSeqStringSetChar FINAL : public LTemplateInstruction<1, 4, 1> {
};
-class LSmiTag FINAL : public LTemplateInstruction<1, 1, 0> {
+class LSmiTag final : public LTemplateInstruction<1, 1, 0> {
public:
explicit LSmiTag(LOperand* value) {
inputs_[0] = value;
@@ -2418,7 +2430,7 @@ class LSmiTag FINAL : public LTemplateInstruction<1, 1, 0> {
};
-class LSmiUntag FINAL : public LTemplateInstruction<1, 1, 0> {
+class LSmiUntag final : public LTemplateInstruction<1, 1, 0> {
public:
LSmiUntag(LOperand* value, bool needs_check)
: needs_check_(needs_check) {
@@ -2435,7 +2447,7 @@ class LSmiUntag FINAL : public LTemplateInstruction<1, 1, 0> {
};
-class LStackCheck FINAL : public LTemplateInstruction<0, 1, 0> {
+class LStackCheck final : public LTemplateInstruction<0, 1, 0> {
public:
explicit LStackCheck(LOperand* context) {
inputs_[0] = context;
@@ -2485,7 +2497,7 @@ class LStoreKeyed : public LTemplateInstruction<0, 3, T> {
}
uint32_t base_offset() const { return this->hydrogen()->base_offset(); }
- void PrintDataTo(StringStream* stream) OVERRIDE {
+ void PrintDataTo(StringStream* stream) override {
this->elements()->PrintTo(stream);
stream->Add("[");
this->key()->PrintTo(stream);
@@ -2508,7 +2520,7 @@ class LStoreKeyed : public LTemplateInstruction<0, 3, T> {
};
-class LStoreKeyedExternal FINAL : public LStoreKeyed<1> {
+class LStoreKeyedExternal final : public LStoreKeyed<1> {
public:
LStoreKeyedExternal(LOperand* elements, LOperand* key, LOperand* value,
LOperand* temp) :
@@ -2522,7 +2534,7 @@ class LStoreKeyedExternal FINAL : public LStoreKeyed<1> {
};
-class LStoreKeyedFixed FINAL : public LStoreKeyed<1> {
+class LStoreKeyedFixed final : public LStoreKeyed<1> {
public:
LStoreKeyedFixed(LOperand* elements, LOperand* key, LOperand* value,
LOperand* temp) :
@@ -2536,7 +2548,7 @@ class LStoreKeyedFixed FINAL : public LStoreKeyed<1> {
};
-class LStoreKeyedFixedDouble FINAL : public LStoreKeyed<1> {
+class LStoreKeyedFixedDouble final : public LStoreKeyed<1> {
public:
LStoreKeyedFixedDouble(LOperand* elements, LOperand* key, LOperand* value,
LOperand* temp) :
@@ -2551,7 +2563,7 @@ class LStoreKeyedFixedDouble FINAL : public LStoreKeyed<1> {
};
-class LStoreKeyedGeneric FINAL : public LTemplateInstruction<0, 4, 0> {
+class LStoreKeyedGeneric final : public LTemplateInstruction<0, 4, 0> {
public:
LStoreKeyedGeneric(LOperand* context,
LOperand* obj,
@@ -2571,13 +2583,13 @@ class LStoreKeyedGeneric FINAL : public LTemplateInstruction<0, 4, 0> {
DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic")
DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric)
- void PrintDataTo(StringStream* stream) OVERRIDE;
+ void PrintDataTo(StringStream* stream) override;
LanguageMode language_mode() { return hydrogen()->language_mode(); }
};
-class LStoreNamedField FINAL : public LTemplateInstruction<0, 2, 2> {
+class LStoreNamedField final : public LTemplateInstruction<0, 2, 2> {
public:
LStoreNamedField(LOperand* object, LOperand* value,
LOperand* temp0, LOperand* temp1) {
@@ -2595,7 +2607,7 @@ class LStoreNamedField FINAL : public LTemplateInstruction<0, 2, 2> {
DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field")
DECLARE_HYDROGEN_ACCESSOR(StoreNamedField)
- void PrintDataTo(StringStream* stream) OVERRIDE;
+ void PrintDataTo(StringStream* stream) override;
Representation representation() const {
return hydrogen()->field_representation();
@@ -2603,7 +2615,7 @@ class LStoreNamedField FINAL : public LTemplateInstruction<0, 2, 2> {
};
-class LStoreNamedGeneric FINAL: public LTemplateInstruction<0, 3, 0> {
+class LStoreNamedGeneric final : public LTemplateInstruction<0, 3, 0> {
public:
LStoreNamedGeneric(LOperand* context, LOperand* object, LOperand* value) {
inputs_[0] = context;
@@ -2618,14 +2630,14 @@ class LStoreNamedGeneric FINAL: public LTemplateInstruction<0, 3, 0> {
DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic")
DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric)
- void PrintDataTo(StringStream* stream) OVERRIDE;
+ void PrintDataTo(StringStream* stream) override;
Handle<Object> name() const { return hydrogen()->name(); }
LanguageMode language_mode() { return hydrogen()->language_mode(); }
};
-class LStringAdd FINAL : public LTemplateInstruction<1, 3, 0> {
+class LStringAdd final : public LTemplateInstruction<1, 3, 0> {
public:
LStringAdd(LOperand* context, LOperand* left, LOperand* right) {
inputs_[0] = context;
@@ -2642,8 +2654,7 @@ class LStringAdd FINAL : public LTemplateInstruction<1, 3, 0> {
};
-
-class LStringCharCodeAt FINAL : public LTemplateInstruction<1, 3, 0> {
+class LStringCharCodeAt final : public LTemplateInstruction<1, 3, 0> {
public:
LStringCharCodeAt(LOperand* context, LOperand* string, LOperand* index) {
inputs_[0] = context;
@@ -2660,7 +2671,7 @@ class LStringCharCodeAt FINAL : public LTemplateInstruction<1, 3, 0> {
};
-class LStringCharFromCode FINAL : public LTemplateInstruction<1, 2, 0> {
+class LStringCharFromCode final : public LTemplateInstruction<1, 2, 0> {
public:
LStringCharFromCode(LOperand* context, LOperand* char_code) {
inputs_[0] = context;
@@ -2675,7 +2686,7 @@ class LStringCharFromCode FINAL : public LTemplateInstruction<1, 2, 0> {
};
-class LStringCompareAndBranch FINAL : public LControlInstruction<3, 0> {
+class LStringCompareAndBranch final : public LControlInstruction<3, 0> {
public:
LStringCompareAndBranch(LOperand* context, LOperand* left, LOperand* right) {
inputs_[0] = context;
@@ -2693,12 +2704,12 @@ class LStringCompareAndBranch FINAL : public LControlInstruction<3, 0> {
Token::Value op() const { return hydrogen()->token(); }
- void PrintDataTo(StringStream* stream) OVERRIDE;
+ void PrintDataTo(StringStream* stream) override;
};
// Truncating conversion from a tagged value to an int32.
-class LTaggedToI FINAL : public LTemplateInstruction<1, 1, 2> {
+class LTaggedToI final : public LTemplateInstruction<1, 1, 2> {
public:
explicit LTaggedToI(LOperand* value, LOperand* temp1, LOperand* temp2) {
inputs_[0] = value;
@@ -2717,7 +2728,7 @@ class LTaggedToI FINAL : public LTemplateInstruction<1, 1, 2> {
};
-class LShiftI FINAL : public LTemplateInstruction<1, 2, 0> {
+class LShiftI final : public LTemplateInstruction<1, 2, 0> {
public:
LShiftI(Token::Value op, LOperand* left, LOperand* right, bool can_deopt)
: op_(op), can_deopt_(can_deopt) {
@@ -2738,7 +2749,7 @@ class LShiftI FINAL : public LTemplateInstruction<1, 2, 0> {
};
-class LShiftS FINAL : public LTemplateInstruction<1, 2, 0> {
+class LShiftS final : public LTemplateInstruction<1, 2, 0> {
public:
LShiftS(Token::Value op, LOperand* left, LOperand* right, bool can_deopt)
: op_(op), can_deopt_(can_deopt) {
@@ -2759,7 +2770,7 @@ class LShiftS FINAL : public LTemplateInstruction<1, 2, 0> {
};
-class LStoreCodeEntry FINAL: public LTemplateInstruction<0, 2, 1> {
+class LStoreCodeEntry final : public LTemplateInstruction<0, 2, 1> {
public:
LStoreCodeEntry(LOperand* function, LOperand* code_object,
LOperand* temp) {
@@ -2772,14 +2783,14 @@ class LStoreCodeEntry FINAL: public LTemplateInstruction<0, 2, 1> {
LOperand* code_object() { return inputs_[1]; }
LOperand* temp() { return temps_[0]; }
- void PrintDataTo(StringStream* stream) OVERRIDE;
+ void PrintDataTo(StringStream* stream) override;
DECLARE_CONCRETE_INSTRUCTION(StoreCodeEntry, "store-code-entry")
DECLARE_HYDROGEN_ACCESSOR(StoreCodeEntry)
};
-class LStoreContextSlot FINAL : public LTemplateInstruction<0, 2, 1> {
+class LStoreContextSlot final : public LTemplateInstruction<0, 2, 1> {
public:
LStoreContextSlot(LOperand* context, LOperand* value, LOperand* temp) {
inputs_[0] = context;
@@ -2796,11 +2807,11 @@ class LStoreContextSlot FINAL : public LTemplateInstruction<0, 2, 1> {
int slot_index() { return hydrogen()->slot_index(); }
- void PrintDataTo(StringStream* stream) OVERRIDE;
+ void PrintDataTo(StringStream* stream) override;
};
-class LSubI FINAL : public LTemplateInstruction<1, 2, 0> {
+class LSubI final : public LTemplateInstruction<1, 2, 0> {
public:
LSubI(LOperand* left, LOperand* right)
: shift_(NO_SHIFT), shift_amount_(0) {
@@ -2844,14 +2855,14 @@ class LSubS: public LTemplateInstruction<1, 2, 0> {
};
-class LThisFunction FINAL : public LTemplateInstruction<1, 0, 0> {
+class LThisFunction final : public LTemplateInstruction<1, 0, 0> {
public:
DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function")
DECLARE_HYDROGEN_ACCESSOR(ThisFunction)
};
-class LToFastProperties FINAL : public LTemplateInstruction<1, 1, 0> {
+class LToFastProperties final : public LTemplateInstruction<1, 1, 0> {
public:
explicit LToFastProperties(LOperand* value) {
inputs_[0] = value;
@@ -2864,7 +2875,7 @@ class LToFastProperties FINAL : public LTemplateInstruction<1, 1, 0> {
};
-class LTransitionElementsKind FINAL : public LTemplateInstruction<0, 2, 2> {
+class LTransitionElementsKind final : public LTemplateInstruction<0, 2, 2> {
public:
LTransitionElementsKind(LOperand* object,
LOperand* context,
@@ -2885,7 +2896,7 @@ class LTransitionElementsKind FINAL : public LTemplateInstruction<0, 2, 2> {
"transition-elements-kind")
DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind)
- void PrintDataTo(StringStream* stream) OVERRIDE;
+ void PrintDataTo(StringStream* stream) override;
Handle<Map> original_map() { return hydrogen()->original_map().handle(); }
Handle<Map> transitioned_map() {
@@ -2896,7 +2907,7 @@ class LTransitionElementsKind FINAL : public LTemplateInstruction<0, 2, 2> {
};
-class LTrapAllocationMemento FINAL : public LTemplateInstruction<0, 1, 2> {
+class LTrapAllocationMemento final : public LTemplateInstruction<0, 1, 2> {
public:
LTrapAllocationMemento(LOperand* object, LOperand* temp1, LOperand* temp2) {
inputs_[0] = object;
@@ -2912,8 +2923,7 @@ class LTrapAllocationMemento FINAL : public LTemplateInstruction<0, 1, 2> {
};
-class LTruncateDoubleToIntOrSmi FINAL
- : public LTemplateInstruction<1, 1, 0> {
+class LTruncateDoubleToIntOrSmi final : public LTemplateInstruction<1, 1, 0> {
public:
explicit LTruncateDoubleToIntOrSmi(LOperand* value) {
inputs_[0] = value;
@@ -2929,7 +2939,7 @@ class LTruncateDoubleToIntOrSmi FINAL
};
-class LTypeof FINAL : public LTemplateInstruction<1, 2, 0> {
+class LTypeof final : public LTemplateInstruction<1, 2, 0> {
public:
LTypeof(LOperand* context, LOperand* value) {
inputs_[0] = context;
@@ -2943,7 +2953,7 @@ class LTypeof FINAL : public LTemplateInstruction<1, 2, 0> {
};
-class LTypeofIsAndBranch FINAL : public LControlInstruction<1, 2> {
+class LTypeofIsAndBranch final : public LControlInstruction<1, 2> {
public:
LTypeofIsAndBranch(LOperand* value, LOperand* temp1, LOperand* temp2) {
inputs_[0] = value;
@@ -2960,11 +2970,11 @@ class LTypeofIsAndBranch FINAL : public LControlInstruction<1, 2> {
Handle<String> type_literal() const { return hydrogen()->type_literal(); }
- void PrintDataTo(StringStream* stream) OVERRIDE;
+ void PrintDataTo(StringStream* stream) override;
};
-class LUint32ToDouble FINAL : public LTemplateInstruction<1, 1, 0> {
+class LUint32ToDouble final : public LTemplateInstruction<1, 1, 0> {
public:
explicit LUint32ToDouble(LOperand* value) {
inputs_[0] = value;
@@ -2976,7 +2986,7 @@ class LUint32ToDouble FINAL : public LTemplateInstruction<1, 1, 0> {
};
-class LCheckMapValue FINAL : public LTemplateInstruction<0, 2, 1> {
+class LCheckMapValue final : public LTemplateInstruction<0, 2, 1> {
public:
LCheckMapValue(LOperand* value, LOperand* map, LOperand* temp) {
inputs_[0] = value;
@@ -2992,7 +3002,7 @@ class LCheckMapValue FINAL : public LTemplateInstruction<0, 2, 1> {
};
-class LLoadFieldByIndex FINAL : public LTemplateInstruction<1, 2, 0> {
+class LLoadFieldByIndex final : public LTemplateInstruction<1, 2, 0> {
public:
LLoadFieldByIndex(LOperand* object, LOperand* index) {
inputs_[0] = object;
@@ -3035,7 +3045,7 @@ class LAllocateBlockContext: public LTemplateInstruction<1, 2, 0> {
};
-class LWrapReceiver FINAL : public LTemplateInstruction<1, 2, 0> {
+class LWrapReceiver final : public LTemplateInstruction<1, 2, 0> {
public:
LWrapReceiver(LOperand* receiver, LOperand* function) {
inputs_[0] = receiver;
@@ -3051,7 +3061,7 @@ class LWrapReceiver FINAL : public LTemplateInstruction<1, 2, 0> {
class LChunkBuilder;
-class LPlatformChunk FINAL : public LChunk {
+class LPlatformChunk final : public LChunk {
public:
LPlatformChunk(CompilationInfo* info, HGraph* graph)
: LChunk(info, graph) { }
@@ -3061,7 +3071,7 @@ class LPlatformChunk FINAL : public LChunk {
};
-class LChunkBuilder FINAL : public LChunkBuilderBase {
+class LChunkBuilder final : public LChunkBuilderBase {
public:
LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator)
: LChunkBuilderBase(info, graph),
diff --git a/deps/v8/src/arm64/lithium-codegen-arm64.cc b/deps/v8/src/arm64/lithium-codegen-arm64.cc
index cd331db249..c2a2ff364c 100644
--- a/deps/v8/src/arm64/lithium-codegen-arm64.cc
+++ b/deps/v8/src/arm64/lithium-codegen-arm64.cc
@@ -18,7 +18,7 @@ namespace v8 {
namespace internal {
-class SafepointGenerator FINAL : public CallWrapper {
+class SafepointGenerator final : public CallWrapper {
public:
SafepointGenerator(LCodeGen* codegen,
LPointerMap* pointers,
@@ -460,7 +460,15 @@ void LCodeGen::DoCallNewArray(LCallNewArray* instr) {
DCHECK(ToRegister(instr->constructor()).is(x1));
__ Mov(x0, Operand(instr->arity()));
- __ LoadRoot(x2, Heap::kUndefinedValueRootIndex);
+ if (instr->arity() == 1) {
+ // We only need the allocation site for the case we have a length argument.
+ // The case may bail out to the runtime, which will determine the correct
+ // elements kind with the site.
+ __ Mov(x2, instr->hydrogen()->site());
+ } else {
+ __ LoadRoot(x2, Heap::kUndefinedValueRootIndex);
+ }
+
ElementsKind kind = instr->hydrogen()->elements_kind();
AllocationSiteOverrideMode override_mode =
@@ -660,7 +668,7 @@ bool LCodeGen::GeneratePrologue() {
// Sloppy mode functions and builtins need to replace the receiver with the
// global proxy when called as functions (without an explicit receiver
// object).
- if (graph()->this_has_uses() && is_sloppy(info_->language_mode()) &&
+ if (is_sloppy(info_->language_mode()) && info()->MayUseThis() &&
!info_->is_native()) {
Label ok;
int receiver_offset = info_->scope()->num_parameters() * kXRegSize;
@@ -703,6 +711,7 @@ bool LCodeGen::GeneratePrologue() {
Comment(";;; Allocate local context");
bool need_write_barrier = true;
// Argument to NewContext is the function, which is in x1.
+ DCHECK(!info()->scope()->is_script_scope());
if (heap_slots <= FastNewContextStub::kMaximumSlots) {
FastNewContextStub stub(isolate(), heap_slots);
__ CallStub(&stub);
@@ -1552,13 +1561,9 @@ void LCodeGen::DoAllocate(LAllocate* instr) {
flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT);
}
- if (instr->hydrogen()->IsOldPointerSpaceAllocation()) {
- DCHECK(!instr->hydrogen()->IsOldDataSpaceAllocation());
+ if (instr->hydrogen()->IsOldSpaceAllocation()) {
DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
- flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE);
- } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) {
- DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
- flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_DATA_SPACE);
+ flags = static_cast<AllocationFlags>(flags | PRETENURE);
}
if (instr->size()->IsConstantOperand()) {
@@ -1613,13 +1618,9 @@ void LCodeGen::DoDeferredAllocate(LAllocate* instr) {
}
int flags = AllocateDoubleAlignFlag::encode(
instr->hydrogen()->MustAllocateDoubleAligned());
- if (instr->hydrogen()->IsOldPointerSpaceAllocation()) {
- DCHECK(!instr->hydrogen()->IsOldDataSpaceAllocation());
- DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
- flags = AllocateTargetSpace::update(flags, OLD_POINTER_SPACE);
- } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) {
+ if (instr->hydrogen()->IsOldSpaceAllocation()) {
DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
- flags = AllocateTargetSpace::update(flags, OLD_DATA_SPACE);
+ flags = AllocateTargetSpace::update(flags, OLD_SPACE);
} else {
flags = AllocateTargetSpace::update(flags, NEW_SPACE);
}
@@ -1771,7 +1772,8 @@ void LCodeGen::DoArithmeticT(LArithmeticT* instr) {
DCHECK(ToRegister(instr->right()).is(x0));
DCHECK(ToRegister(instr->result()).is(x0));
- Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), instr->op()).code();
+ Handle<Code> code = CodeFactory::BinaryOpIC(
+ isolate(), instr->op(), instr->language_mode()).code();
CallCode(code, RelocInfo::CODE_TARGET, instr);
}
@@ -2031,29 +2033,14 @@ void LCodeGen::DoTailCallThroughMegamorphicCache(
Register extra = x5;
Register extra2 = x6;
Register extra3 = x7;
- DCHECK(!FLAG_vector_ics ||
- !AreAliased(ToRegister(instr->slot()), ToRegister(instr->vector()),
- scratch, extra, extra2, extra3));
- // Important for the tail-call.
- bool must_teardown_frame = NeedsEagerFrame();
-
- if (!instr->hydrogen()->is_just_miss()) {
- DCHECK(!instr->hydrogen()->is_keyed_load());
-
- // The probe will tail call to a handler if found.
- isolate()->stub_cache()->GenerateProbe(
- masm(), Code::LOAD_IC, instr->hydrogen()->flags(), must_teardown_frame,
- receiver, name, scratch, extra, extra2, extra3);
- }
+ // The probe will tail call to a handler if found.
+ isolate()->stub_cache()->GenerateProbe(
+ masm(), Code::LOAD_IC, instr->hydrogen()->flags(), false, receiver, name,
+ scratch, extra, extra2, extra3);
// Tail call to miss if we ended up here.
- if (must_teardown_frame) __ LeaveFrame(StackFrame::INTERNAL);
- if (instr->hydrogen()->is_keyed_load()) {
- KeyedLoadIC::GenerateMiss(masm());
- } else {
- LoadIC::GenerateMiss(masm());
- }
+ LoadIC::GenerateMiss(masm());
}
@@ -2242,6 +2229,19 @@ void LCodeGen::DoCheckSmi(LCheckSmi* instr) {
}
+void LCodeGen::DoCheckArrayBufferNotNeutered(
+ LCheckArrayBufferNotNeutered* instr) {
+ UseScratchRegisterScope temps(masm());
+ Register view = ToRegister(instr->view());
+ Register scratch = temps.AcquireX();
+
+ __ Ldr(scratch, FieldMemOperand(view, JSArrayBufferView::kBufferOffset));
+ __ Ldr(scratch, FieldMemOperand(scratch, JSArrayBuffer::kBitFieldOffset));
+ __ Tst(scratch, Operand(1 << JSArrayBuffer::WasNeutered::kShift));
+ DeoptimizeIf(ne, instr, Deoptimizer::kOutOfBounds);
+}
+
+
void LCodeGen::DoCheckInstanceType(LCheckInstanceType* instr) {
Register input = ToRegister(instr->value());
Register scratch = ToRegister(instr->temp());
@@ -2911,13 +2911,6 @@ void LCodeGen::DoForInPrepareMap(LForInPrepareMap* instr) {
DCHECK(instr->IsMarkedAsCall());
DCHECK(object.Is(x0));
- DeoptimizeIfRoot(object, Heap::kUndefinedValueRootIndex, instr,
- Deoptimizer::kUndefined);
-
- __ LoadRoot(null_value, Heap::kNullValueRootIndex);
- __ Cmp(object, null_value);
- DeoptimizeIf(eq, instr, Deoptimizer::kNull);
-
DeoptimizeIfSmi(object, instr, Deoptimizer::kSmi);
STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_SPEC_OBJECT_TYPE);
@@ -2925,6 +2918,7 @@ void LCodeGen::DoForInPrepareMap(LForInPrepareMap* instr) {
DeoptimizeIf(le, instr, Deoptimizer::kNotAJavaScriptObject);
Label use_cache, call_runtime;
+ __ LoadRoot(null_value, Heap::kNullValueRootIndex);
__ CheckEnumCache(object, null_value, x1, x2, x3, x4, &call_runtime);
__ Ldr(object, FieldMemOperand(object, HeapObject::kMapOffset));
@@ -3634,6 +3628,22 @@ void LCodeGen::DoLoadKeyedFixed(LLoadKeyedFixed* instr) {
DeoptimizeIfRoot(result, Heap::kTheHoleValueRootIndex, instr,
Deoptimizer::kHole);
}
+ } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) {
+ DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS);
+ Label done;
+ __ CompareRoot(result, Heap::kTheHoleValueRootIndex);
+ __ B(ne, &done);
+ if (info()->IsStub()) {
+ // A stub can safely convert the hole to undefined only if the array
+ // protector cell contains (Smi) Isolate::kArrayProtectorValid. Otherwise
+ // it needs to bail out.
+ __ LoadRoot(result, Heap::kArrayProtectorRootIndex);
+ __ Ldr(result, FieldMemOperand(result, Cell::kValueOffset));
+ __ Cmp(result, Operand(Smi::FromInt(Isolate::kArrayProtectorValid)));
+ DeoptimizeIf(ne, instr, Deoptimizer::kHole);
+ }
+ __ LoadRoot(result, Heap::kUndefinedValueRootIndex);
+ __ Bind(&done);
}
}
@@ -3642,7 +3652,8 @@ void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
DCHECK(ToRegister(instr->context()).is(cp));
DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister()));
- if (FLAG_vector_ics) {
+
+ if (instr->hydrogen()->HasVectorAndSlot()) {
EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr);
}
@@ -4338,7 +4349,7 @@ void LCodeGen::DoMulConstIS(LMulConstIS* instr) {
Register left =
is_smi ? ToRegister(instr->left()) : ToRegister32(instr->left()) ;
int32_t right = ToInteger32(instr->right());
- DCHECK((right > -kMaxInt) || (right < kMaxInt));
+ DCHECK((right > -kMaxInt) && (right < kMaxInt));
bool can_overflow = instr->hydrogen()->CheckFlag(HValue::kCanOverflow);
bool bailout_on_minus_zero =
@@ -5784,9 +5795,17 @@ void LCodeGen::DoTruncateDoubleToIntOrSmi(LTruncateDoubleToIntOrSmi* instr) {
void LCodeGen::DoTypeof(LTypeof* instr) {
- Register input = ToRegister(instr->value());
- __ Push(input);
- CallRuntime(Runtime::kTypeof, 1, instr);
+ DCHECK(ToRegister(instr->value()).is(x3));
+ DCHECK(ToRegister(instr->result()).is(x0));
+ Label end, do_call;
+ Register value_register = ToRegister(instr->value());
+ __ JumpIfNotSmi(value_register, &do_call);
+ __ Mov(x0, Immediate(isolate()->factory()->number_string()));
+ __ B(&end);
+ __ Bind(&do_call);
+ TypeofStub stub(isolate());
+ CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
+ __ Bind(&end);
}
@@ -5960,7 +5979,7 @@ void LCodeGen::DoDeferredLoadMutableDouble(LLoadFieldByIndex* instr,
void LCodeGen::DoLoadFieldByIndex(LLoadFieldByIndex* instr) {
- class DeferredLoadMutableDouble FINAL : public LDeferredCode {
+ class DeferredLoadMutableDouble final : public LDeferredCode {
public:
DeferredLoadMutableDouble(LCodeGen* codegen,
LLoadFieldByIndex* instr,
@@ -5973,10 +5992,10 @@ void LCodeGen::DoLoadFieldByIndex(LLoadFieldByIndex* instr) {
object_(object),
index_(index) {
}
- void Generate() OVERRIDE {
+ void Generate() override {
codegen()->DoDeferredLoadMutableDouble(instr_, result_, object_, index_);
}
- LInstruction* instr() OVERRIDE { return instr_; }
+ LInstruction* instr() override { return instr_; }
private:
LLoadFieldByIndex* instr_;
diff --git a/deps/v8/src/arm64/lithium-codegen-arm64.h b/deps/v8/src/arm64/lithium-codegen-arm64.h
index d94262e74d..809ed556d0 100644
--- a/deps/v8/src/arm64/lithium-codegen-arm64.h
+++ b/deps/v8/src/arm64/lithium-codegen-arm64.h
@@ -276,7 +276,7 @@ class LCodeGen: public LCodeGenBase {
void RestoreCallerDoubles();
// Code generation steps. Returns true if code generation should continue.
- void GenerateBodyInstructionPre(LInstruction* instr) OVERRIDE;
+ void GenerateBodyInstructionPre(LInstruction* instr) override;
bool GeneratePrologue();
bool GenerateDeferredCode();
bool GenerateJumpTable();
@@ -324,7 +324,7 @@ class LCodeGen: public LCodeGenBase {
LInstruction* instr);
// Support for recording safepoint and position information.
- void RecordAndWritePosition(int position) OVERRIDE;
+ void RecordAndWritePosition(int position) override;
void RecordSafepoint(LPointerMap* pointers,
Safepoint::Kind kind,
int arguments,
@@ -337,7 +337,7 @@ class LCodeGen: public LCodeGenBase {
void RecordSafepointWithLazyDeopt(LInstruction* instr,
SafepointMode safepoint_mode);
- void EnsureSpaceForLazyDeopt(int space_needed) OVERRIDE;
+ void EnsureSpaceForLazyDeopt(int space_needed) override;
ZoneList<LEnvironment*> deoptimizations_;
ZoneList<Deoptimizer::JumpTableEntry*> jump_table_;
diff --git a/deps/v8/src/arm64/macro-assembler-arm64.cc b/deps/v8/src/arm64/macro-assembler-arm64.cc
index 5df2e5a46d..07e237e0b4 100644
--- a/deps/v8/src/arm64/macro-assembler-arm64.cc
+++ b/deps/v8/src/arm64/macro-assembler-arm64.cc
@@ -12,7 +12,6 @@
#include "src/codegen.h"
#include "src/cpu-profiler.h"
#include "src/debug.h"
-#include "src/isolate-inl.h"
#include "src/runtime/runtime.h"
namespace v8 {
diff --git a/deps/v8/src/arm64/macro-assembler-arm64.h b/deps/v8/src/arm64/macro-assembler-arm64.h
index 3937f6f9bb..1160c40bf6 100644
--- a/deps/v8/src/arm64/macro-assembler-arm64.h
+++ b/deps/v8/src/arm64/macro-assembler-arm64.h
@@ -1284,7 +1284,7 @@ class MacroAssembler : public Assembler {
// ---------------------------------------------------------------------------
// Allocation support
- // Allocate an object in new space or old pointer space. The object_size is
+ // Allocate an object in new space or old space. The object_size is
// specified either in bytes or in words if the allocation flag SIZE_IN_WORDS
// is passed. The allocated object is returned in result.
//
diff --git a/deps/v8/src/arm64/regexp-macro-assembler-arm64.cc b/deps/v8/src/arm64/regexp-macro-assembler-arm64.cc
index 1630f212bf..4315fd6a45 100644
--- a/deps/v8/src/arm64/regexp-macro-assembler-arm64.cc
+++ b/deps/v8/src/arm64/regexp-macro-assembler-arm64.cc
@@ -1285,104 +1285,19 @@ static T& frame_entry(Address re_frame, int frame_offset) {
}
-int RegExpMacroAssemblerARM64::CheckStackGuardState(Address* return_address,
- Code* re_code,
- Address re_frame,
- int start_offset,
- const byte** input_start,
- const byte** input_end) {
- Isolate* isolate = frame_entry<Isolate*>(re_frame, kIsolate);
- StackLimitCheck check(isolate);
- if (check.JsHasOverflowed()) {
- isolate->StackOverflow();
- return EXCEPTION;
- }
-
- // If not real stack overflow the stack guard was used to interrupt
- // execution for another purpose.
-
- // If this is a direct call from JavaScript retry the RegExp forcing the call
- // through the runtime system. Currently the direct call cannot handle a GC.
- if (frame_entry<int>(re_frame, kDirectCall) == 1) {
- return RETRY;
- }
-
- // Prepare for possible GC.
- HandleScope handles(isolate);
- Handle<Code> code_handle(re_code);
-
- Handle<String> subject(frame_entry<String*>(re_frame, kInput));
-
- // Current string.
- bool is_one_byte = subject->IsOneByteRepresentationUnderneath();
-
- DCHECK(re_code->instruction_start() <= *return_address);
- DCHECK(*return_address <=
- re_code->instruction_start() + re_code->instruction_size());
-
- Object* result = isolate->stack_guard()->HandleInterrupts();
-
- if (*code_handle != re_code) { // Return address no longer valid
- int delta = code_handle->address() - re_code->address();
- // Overwrite the return address on the stack.
- *return_address += delta;
- }
-
- if (result->IsException()) {
- return EXCEPTION;
- }
-
- Handle<String> subject_tmp = subject;
- int slice_offset = 0;
-
- // Extract the underlying string and the slice offset.
- if (StringShape(*subject_tmp).IsCons()) {
- subject_tmp = Handle<String>(ConsString::cast(*subject_tmp)->first());
- } else if (StringShape(*subject_tmp).IsSliced()) {
- SlicedString* slice = SlicedString::cast(*subject_tmp);
- subject_tmp = Handle<String>(slice->parent());
- slice_offset = slice->offset();
- }
-
- // String might have changed.
- if (subject_tmp->IsOneByteRepresentation() != is_one_byte) {
- // If we changed between an Latin1 and an UC16 string, the specialized
- // code cannot be used, and we need to restart regexp matching from
- // scratch (including, potentially, compiling a new version of the code).
- return RETRY;
- }
+template <typename T>
+static T* frame_entry_address(Address re_frame, int frame_offset) {
+ return reinterpret_cast<T*>(re_frame + frame_offset);
+}
- // Otherwise, the content of the string might have moved. It must still
- // be a sequential or external string with the same content.
- // Update the start and end pointers in the stack frame to the current
- // location (whether it has actually moved or not).
- DCHECK(StringShape(*subject_tmp).IsSequential() ||
- StringShape(*subject_tmp).IsExternal());
-
- // The original start address of the characters to match.
- const byte* start_address = *input_start;
-
- // Find the current start address of the same character at the current string
- // position.
- const byte* new_address = StringCharacterPosition(*subject_tmp,
- start_offset + slice_offset);
-
- if (start_address != new_address) {
- // If there is a difference, update the object pointer and start and end
- // addresses in the RegExp stack frame to match the new value.
- const byte* end_address = *input_end;
- int byte_length = static_cast<int>(end_address - start_address);
- frame_entry<const String*>(re_frame, kInput) = *subject;
- *input_start = new_address;
- *input_end = new_address + byte_length;
- } else if (frame_entry<const String*>(re_frame, kInput) != *subject) {
- // Subject string might have been a ConsString that underwent
- // short-circuiting during GC. That will not change start_address but
- // will change pointer inside the subject handle.
- frame_entry<const String*>(re_frame, kInput) = *subject;
- }
- return 0;
+int RegExpMacroAssemblerARM64::CheckStackGuardState(
+ Address* return_address, Code* re_code, Address re_frame, int start_index,
+ const byte** input_start, const byte** input_end) {
+ return NativeRegExpMacroAssembler::CheckStackGuardState(
+ frame_entry<Isolate*>(re_frame, kIsolate), start_index,
+ frame_entry<int>(re_frame, kDirectCall) == 1, return_address, re_code,
+ frame_entry_address<String*>(re_frame, kInput), input_start, input_end);
}