OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
8 | 8 |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 1254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1265 // Initial map for the builtin Array functions should be maps. | 1265 // Initial map for the builtin Array functions should be maps. |
1266 __ movp(rbx, FieldOperand(rdi, JSFunction::kPrototypeOrInitialMapOffset)); | 1266 __ movp(rbx, FieldOperand(rdi, JSFunction::kPrototypeOrInitialMapOffset)); |
1267 // Will both indicate a NULL and a Smi. | 1267 // Will both indicate a NULL and a Smi. |
1268 STATIC_ASSERT(kSmiTag == 0); | 1268 STATIC_ASSERT(kSmiTag == 0); |
1269 Condition not_smi = NegateCondition(masm->CheckSmi(rbx)); | 1269 Condition not_smi = NegateCondition(masm->CheckSmi(rbx)); |
1270 __ Check(not_smi, kUnexpectedInitialMapForArrayFunction); | 1270 __ Check(not_smi, kUnexpectedInitialMapForArrayFunction); |
1271 __ CmpObjectType(rbx, MAP_TYPE, rcx); | 1271 __ CmpObjectType(rbx, MAP_TYPE, rcx); |
1272 __ Check(equal, kUnexpectedInitialMapForArrayFunction); | 1272 __ Check(equal, kUnexpectedInitialMapForArrayFunction); |
1273 } | 1273 } |
1274 | 1274 |
1275 __ movp(rdx, rdi); | |
1276 // Run the native code for the Array function called as a normal function. | 1275 // Run the native code for the Array function called as a normal function. |
1277 // tail call a stub | 1276 // tail call a stub |
1278 __ LoadRoot(rbx, Heap::kUndefinedValueRootIndex); | 1277 __ LoadRoot(rbx, Heap::kUndefinedValueRootIndex); |
1279 ArrayConstructorStub stub(masm->isolate()); | 1278 ArrayConstructorStub stub(masm->isolate()); |
1280 __ TailCallStub(&stub); | 1279 __ TailCallStub(&stub); |
1281 } | 1280 } |
1282 | 1281 |
1283 | 1282 |
1284 void Builtins::Generate_StringConstructCode(MacroAssembler* masm) { | 1283 void Builtins::Generate_StringConstructCode(MacroAssembler* masm) { |
1285 // ----------- S t a t e ------------- | 1284 // ----------- S t a t e ------------- |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1615 __ bind(&ok); | 1614 __ bind(&ok); |
1616 __ ret(0); | 1615 __ ret(0); |
1617 } | 1616 } |
1618 | 1617 |
1619 | 1618 |
1620 #undef __ | 1619 #undef __ |
1621 | 1620 |
1622 } } // namespace v8::internal | 1621 } } // namespace v8::internal |
1623 | 1622 |
1624 #endif // V8_TARGET_ARCH_X64 | 1623 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |