OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 | 133 |
134 // Allocated the JSArray. Now initialize the fields except for the elements | 134 // Allocated the JSArray. Now initialize the fields except for the elements |
135 // array. | 135 // array. |
136 // result: JSObject | 136 // result: JSObject |
137 // scratch1: initial map | 137 // scratch1: initial map |
138 // scratch2: start of next object | 138 // scratch2: start of next object |
139 __ str(scratch1, FieldMemOperand(result, JSObject::kMapOffset)); | 139 __ str(scratch1, FieldMemOperand(result, JSObject::kMapOffset)); |
140 __ LoadRoot(scratch1, Heap::kEmptyFixedArrayRootIndex); | 140 __ LoadRoot(scratch1, Heap::kEmptyFixedArrayRootIndex); |
141 __ str(scratch1, FieldMemOperand(result, JSArray::kPropertiesOffset)); | 141 __ str(scratch1, FieldMemOperand(result, JSArray::kPropertiesOffset)); |
142 // Field JSArray::kElementsOffset is initialized later. | 142 // Field JSArray::kElementsOffset is initialized later. |
143 __ mov(scratch3, Operand(0, RelocInfo::NONE32)); | 143 __ mov(scratch3, Operand::Zero()); |
144 __ str(scratch3, FieldMemOperand(result, JSArray::kLengthOffset)); | 144 __ str(scratch3, FieldMemOperand(result, JSArray::kLengthOffset)); |
145 | 145 |
146 if (initial_capacity == 0) { | 146 if (initial_capacity == 0) { |
147 __ str(scratch1, FieldMemOperand(result, JSArray::kElementsOffset)); | 147 __ str(scratch1, FieldMemOperand(result, JSArray::kElementsOffset)); |
148 return; | 148 return; |
149 } | 149 } |
150 | 150 |
151 // Calculate the location of the elements array and set elements array member | 151 // Calculate the location of the elements array and set elements array member |
152 // of the JSArray. | 152 // of the JSArray. |
153 // result: JSObject | 153 // result: JSObject |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 // entering the generic code. In both cases argc in r0 needs to be preserved. | 312 // entering the generic code. In both cases argc in r0 needs to be preserved. |
313 // Both registers are preserved by this code so no need to differentiate between | 313 // Both registers are preserved by this code so no need to differentiate between |
314 // construct call and normal call. | 314 // construct call and normal call. |
315 static void ArrayNativeCode(MacroAssembler* masm, | 315 static void ArrayNativeCode(MacroAssembler* masm, |
316 Label* call_generic_code) { | 316 Label* call_generic_code) { |
317 Counters* counters = masm->isolate()->counters(); | 317 Counters* counters = masm->isolate()->counters(); |
318 Label argc_one_or_more, argc_two_or_more, not_empty_array, empty_array, | 318 Label argc_one_or_more, argc_two_or_more, not_empty_array, empty_array, |
319 has_non_smi_element, finish, cant_transition_map, not_double; | 319 has_non_smi_element, finish, cant_transition_map, not_double; |
320 | 320 |
321 // Check for array construction with zero arguments or one. | 321 // Check for array construction with zero arguments or one. |
322 __ cmp(r0, Operand(0, RelocInfo::NONE32)); | 322 __ cmp(r0, Operand::Zero()); |
323 __ b(ne, &argc_one_or_more); | 323 __ b(ne, &argc_one_or_more); |
324 | 324 |
325 // Handle construction of an empty array. | 325 // Handle construction of an empty array. |
326 __ bind(&empty_array); | 326 __ bind(&empty_array); |
327 AllocateEmptyJSArray(masm, | 327 AllocateEmptyJSArray(masm, |
328 r1, | 328 r1, |
329 r2, | 329 r2, |
330 r3, | 330 r3, |
331 r4, | 331 r4, |
332 r5, | 332 r5, |
333 call_generic_code); | 333 call_generic_code); |
334 __ IncrementCounter(counters->array_function_native(), 1, r3, r4); | 334 __ IncrementCounter(counters->array_function_native(), 1, r3, r4); |
335 // Set up return value, remove receiver from stack and return. | 335 // Set up return value, remove receiver from stack and return. |
336 __ mov(r0, r2); | 336 __ mov(r0, r2); |
337 __ add(sp, sp, Operand(kPointerSize)); | 337 __ add(sp, sp, Operand(kPointerSize)); |
338 __ Jump(lr); | 338 __ Jump(lr); |
339 | 339 |
340 // Check for one argument. Bail out if argument is not smi or if it is | 340 // Check for one argument. Bail out if argument is not smi or if it is |
341 // negative. | 341 // negative. |
342 __ bind(&argc_one_or_more); | 342 __ bind(&argc_one_or_more); |
343 __ cmp(r0, Operand(1)); | 343 __ cmp(r0, Operand(1)); |
344 __ b(ne, &argc_two_or_more); | 344 __ b(ne, &argc_two_or_more); |
345 STATIC_ASSERT(kSmiTag == 0); | 345 STATIC_ASSERT(kSmiTag == 0); |
346 __ ldr(r2, MemOperand(sp)); // Get the argument from the stack. | 346 __ ldr(r2, MemOperand(sp)); // Get the argument from the stack. |
347 __ tst(r2, r2); | 347 __ tst(r2, r2); |
348 __ b(ne, ¬_empty_array); | 348 __ b(ne, ¬_empty_array); |
349 __ Drop(1); // Adjust stack. | 349 __ Drop(1); // Adjust stack. |
350 __ mov(r0, Operand(0)); // Treat this as a call with argc of zero. | 350 __ mov(r0, Operand::Zero()); // Treat this as a call with argc of zero. |
351 __ b(&empty_array); | 351 __ b(&empty_array); |
352 | 352 |
353 __ bind(¬_empty_array); | 353 __ bind(¬_empty_array); |
354 __ and_(r3, r2, Operand(kIntptrSignBit | kSmiTagMask), SetCC); | 354 __ and_(r3, r2, Operand(kIntptrSignBit | kSmiTagMask), SetCC); |
355 __ b(ne, call_generic_code); | 355 __ b(ne, call_generic_code); |
356 | 356 |
357 // Handle construction of an empty array of a certain size. Bail out if size | 357 // Handle construction of an empty array of a certain size. Bail out if size |
358 // is too large to actually allocate an elements array. | 358 // is too large to actually allocate an elements array. |
359 STATIC_ASSERT(kSmiTag == 0); | 359 STATIC_ASSERT(kSmiTag == 0); |
360 __ cmp(r2, Operand(JSObject::kInitialMaxFastElementArray << kSmiTagSize)); | 360 __ cmp(r2, Operand(JSObject::kInitialMaxFastElementArray << kSmiTagSize)); |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
583 | 583 |
584 Register function = r1; | 584 Register function = r1; |
585 if (FLAG_debug_code) { | 585 if (FLAG_debug_code) { |
586 __ LoadGlobalFunction(Context::STRING_FUNCTION_INDEX, r2); | 586 __ LoadGlobalFunction(Context::STRING_FUNCTION_INDEX, r2); |
587 __ cmp(function, Operand(r2)); | 587 __ cmp(function, Operand(r2)); |
588 __ Assert(eq, "Unexpected String function"); | 588 __ Assert(eq, "Unexpected String function"); |
589 } | 589 } |
590 | 590 |
591 // Load the first arguments in r0 and get rid of the rest. | 591 // Load the first arguments in r0 and get rid of the rest. |
592 Label no_arguments; | 592 Label no_arguments; |
593 __ cmp(r0, Operand(0, RelocInfo::NONE32)); | 593 __ cmp(r0, Operand::Zero()); |
594 __ b(eq, &no_arguments); | 594 __ b(eq, &no_arguments); |
595 // First args = sp[(argc - 1) * 4]. | 595 // First args = sp[(argc - 1) * 4]. |
596 __ sub(r0, r0, Operand(1)); | 596 __ sub(r0, r0, Operand(1)); |
597 __ ldr(r0, MemOperand(sp, r0, LSL, kPointerSizeLog2, PreIndex)); | 597 __ ldr(r0, MemOperand(sp, r0, LSL, kPointerSizeLog2, PreIndex)); |
598 // sp now point to args[0], drop args[0] + receiver. | 598 // sp now point to args[0], drop args[0] + receiver. |
599 __ Drop(2); | 599 __ Drop(2); |
600 | 600 |
601 Register argument = r2; | 601 Register argument = r2; |
602 Label not_cached, argument_is_string; | 602 Label not_cached, argument_is_string; |
603 NumberToStringStub::GenerateLookupNumberStringCache( | 603 NumberToStringStub::GenerateLookupNumberStringCache( |
(...skipping 23 matching lines...) Expand all Loading... |
627 TAG_OBJECT); | 627 TAG_OBJECT); |
628 | 628 |
629 // Initialising the String Object. | 629 // Initialising the String Object. |
630 Register map = r3; | 630 Register map = r3; |
631 __ LoadGlobalFunctionInitialMap(function, map, r4); | 631 __ LoadGlobalFunctionInitialMap(function, map, r4); |
632 if (FLAG_debug_code) { | 632 if (FLAG_debug_code) { |
633 __ ldrb(r4, FieldMemOperand(map, Map::kInstanceSizeOffset)); | 633 __ ldrb(r4, FieldMemOperand(map, Map::kInstanceSizeOffset)); |
634 __ cmp(r4, Operand(JSValue::kSize >> kPointerSizeLog2)); | 634 __ cmp(r4, Operand(JSValue::kSize >> kPointerSizeLog2)); |
635 __ Assert(eq, "Unexpected string wrapper instance size"); | 635 __ Assert(eq, "Unexpected string wrapper instance size"); |
636 __ ldrb(r4, FieldMemOperand(map, Map::kUnusedPropertyFieldsOffset)); | 636 __ ldrb(r4, FieldMemOperand(map, Map::kUnusedPropertyFieldsOffset)); |
637 __ cmp(r4, Operand(0, RelocInfo::NONE32)); | 637 __ cmp(r4, Operand::Zero()); |
638 __ Assert(eq, "Unexpected unused properties of string wrapper"); | 638 __ Assert(eq, "Unexpected unused properties of string wrapper"); |
639 } | 639 } |
640 __ str(map, FieldMemOperand(r0, HeapObject::kMapOffset)); | 640 __ str(map, FieldMemOperand(r0, HeapObject::kMapOffset)); |
641 | 641 |
642 __ LoadRoot(r3, Heap::kEmptyFixedArrayRootIndex); | 642 __ LoadRoot(r3, Heap::kEmptyFixedArrayRootIndex); |
643 __ str(r3, FieldMemOperand(r0, JSObject::kPropertiesOffset)); | 643 __ str(r3, FieldMemOperand(r0, JSObject::kPropertiesOffset)); |
644 __ str(r3, FieldMemOperand(r0, JSObject::kElementsOffset)); | 644 __ str(r3, FieldMemOperand(r0, JSObject::kElementsOffset)); |
645 | 645 |
646 __ str(argument, FieldMemOperand(r0, JSValue::kValueOffset)); | 646 __ str(argument, FieldMemOperand(r0, JSValue::kValueOffset)); |
647 | 647 |
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1090 bool is_construct) { | 1090 bool is_construct) { |
1091 // Called from Generate_JS_Entry | 1091 // Called from Generate_JS_Entry |
1092 // r0: code entry | 1092 // r0: code entry |
1093 // r1: function | 1093 // r1: function |
1094 // r2: receiver | 1094 // r2: receiver |
1095 // r3: argc | 1095 // r3: argc |
1096 // r4: argv | 1096 // r4: argv |
1097 // r5-r7, cp may be clobbered | 1097 // r5-r7, cp may be clobbered |
1098 | 1098 |
1099 // Clear the context before we push it when entering the internal frame. | 1099 // Clear the context before we push it when entering the internal frame. |
1100 __ mov(cp, Operand(0, RelocInfo::NONE32)); | 1100 __ mov(cp, Operand::Zero()); |
1101 | 1101 |
1102 // Enter an internal frame. | 1102 // Enter an internal frame. |
1103 { | 1103 { |
1104 FrameScope scope(masm, StackFrame::INTERNAL); | 1104 FrameScope scope(masm, StackFrame::INTERNAL); |
1105 | 1105 |
1106 // Set up the context from the function argument. | 1106 // Set up the context from the function argument. |
1107 __ ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset)); | 1107 __ ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset)); |
1108 | 1108 |
1109 __ InitializeRootRegister(); | 1109 __ InitializeRootRegister(); |
1110 | 1110 |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1368 // the deoptimizer infrastructure. | 1368 // the deoptimizer infrastructure. |
1369 Deoptimizer::EntryGenerator generator(masm, Deoptimizer::OSR); | 1369 Deoptimizer::EntryGenerator generator(masm, Deoptimizer::OSR); |
1370 generator.Generate(); | 1370 generator.Generate(); |
1371 } | 1371 } |
1372 | 1372 |
1373 | 1373 |
1374 void Builtins::Generate_FunctionCall(MacroAssembler* masm) { | 1374 void Builtins::Generate_FunctionCall(MacroAssembler* masm) { |
1375 // 1. Make sure we have at least one argument. | 1375 // 1. Make sure we have at least one argument. |
1376 // r0: actual number of arguments | 1376 // r0: actual number of arguments |
1377 { Label done; | 1377 { Label done; |
1378 __ cmp(r0, Operand(0)); | 1378 __ cmp(r0, Operand::Zero()); |
1379 __ b(ne, &done); | 1379 __ b(ne, &done); |
1380 __ LoadRoot(r2, Heap::kUndefinedValueRootIndex); | 1380 __ LoadRoot(r2, Heap::kUndefinedValueRootIndex); |
1381 __ push(r2); | 1381 __ push(r2); |
1382 __ add(r0, r0, Operand(1)); | 1382 __ add(r0, r0, Operand(1)); |
1383 __ bind(&done); | 1383 __ bind(&done); |
1384 } | 1384 } |
1385 | 1385 |
1386 // 2. Get the function to call (passed as receiver) from the stack, check | 1386 // 2. Get the function to call (passed as receiver) from the stack, check |
1387 // if it is a function. | 1387 // if it is a function. |
1388 // r0: actual number of arguments | 1388 // r0: actual number of arguments |
1389 Label slow, non_function; | 1389 Label slow, non_function; |
1390 __ ldr(r1, MemOperand(sp, r0, LSL, kPointerSizeLog2)); | 1390 __ ldr(r1, MemOperand(sp, r0, LSL, kPointerSizeLog2)); |
1391 __ JumpIfSmi(r1, &non_function); | 1391 __ JumpIfSmi(r1, &non_function); |
1392 __ CompareObjectType(r1, r2, r2, JS_FUNCTION_TYPE); | 1392 __ CompareObjectType(r1, r2, r2, JS_FUNCTION_TYPE); |
1393 __ b(ne, &slow); | 1393 __ b(ne, &slow); |
1394 | 1394 |
1395 // 3a. Patch the first argument if necessary when calling a function. | 1395 // 3a. Patch the first argument if necessary when calling a function. |
1396 // r0: actual number of arguments | 1396 // r0: actual number of arguments |
1397 // r1: function | 1397 // r1: function |
1398 Label shift_arguments; | 1398 Label shift_arguments; |
1399 __ mov(r4, Operand(0, RelocInfo::NONE32)); // indicate regular JS_FUNCTION | 1399 __ mov(r4, Operand::Zero()); // indicate regular JS_FUNCTION |
1400 { Label convert_to_object, use_global_receiver, patch_receiver; | 1400 { Label convert_to_object, use_global_receiver, patch_receiver; |
1401 // Change context eagerly in case we need the global receiver. | 1401 // Change context eagerly in case we need the global receiver. |
1402 __ ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset)); | 1402 __ ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset)); |
1403 | 1403 |
1404 // Do not transform the receiver for strict mode functions. | 1404 // Do not transform the receiver for strict mode functions. |
1405 __ ldr(r2, FieldMemOperand(r1, JSFunction::kSharedFunctionInfoOffset)); | 1405 __ ldr(r2, FieldMemOperand(r1, JSFunction::kSharedFunctionInfoOffset)); |
1406 __ ldr(r3, FieldMemOperand(r2, SharedFunctionInfo::kCompilerHintsOffset)); | 1406 __ ldr(r3, FieldMemOperand(r2, SharedFunctionInfo::kCompilerHintsOffset)); |
1407 __ tst(r3, Operand(1 << (SharedFunctionInfo::kStrictModeFunction + | 1407 __ tst(r3, Operand(1 << (SharedFunctionInfo::kStrictModeFunction + |
1408 kSmiTagSize))); | 1408 kSmiTagSize))); |
1409 __ b(ne, &shift_arguments); | 1409 __ b(ne, &shift_arguments); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1444 __ mov(r2, r0); | 1444 __ mov(r2, r0); |
1445 | 1445 |
1446 __ pop(r0); | 1446 __ pop(r0); |
1447 __ mov(r0, Operand(r0, ASR, kSmiTagSize)); | 1447 __ mov(r0, Operand(r0, ASR, kSmiTagSize)); |
1448 | 1448 |
1449 // Exit the internal frame. | 1449 // Exit the internal frame. |
1450 } | 1450 } |
1451 | 1451 |
1452 // Restore the function to r1, and the flag to r4. | 1452 // Restore the function to r1, and the flag to r4. |
1453 __ ldr(r1, MemOperand(sp, r0, LSL, kPointerSizeLog2)); | 1453 __ ldr(r1, MemOperand(sp, r0, LSL, kPointerSizeLog2)); |
1454 __ mov(r4, Operand(0, RelocInfo::NONE32)); | 1454 __ mov(r4, Operand::Zero()); |
1455 __ jmp(&patch_receiver); | 1455 __ jmp(&patch_receiver); |
1456 | 1456 |
1457 // Use the global receiver object from the called function as the | 1457 // Use the global receiver object from the called function as the |
1458 // receiver. | 1458 // receiver. |
1459 __ bind(&use_global_receiver); | 1459 __ bind(&use_global_receiver); |
1460 const int kGlobalIndex = | 1460 const int kGlobalIndex = |
1461 Context::kHeaderSize + Context::GLOBAL_OBJECT_INDEX * kPointerSize; | 1461 Context::kHeaderSize + Context::GLOBAL_OBJECT_INDEX * kPointerSize; |
1462 __ ldr(r2, FieldMemOperand(cp, kGlobalIndex)); | 1462 __ ldr(r2, FieldMemOperand(cp, kGlobalIndex)); |
1463 __ ldr(r2, FieldMemOperand(r2, GlobalObject::kNativeContextOffset)); | 1463 __ ldr(r2, FieldMemOperand(r2, GlobalObject::kNativeContextOffset)); |
1464 __ ldr(r2, FieldMemOperand(r2, kGlobalIndex)); | 1464 __ ldr(r2, FieldMemOperand(r2, kGlobalIndex)); |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1514 | 1514 |
1515 // 5a. Call non-function via tail call to CALL_NON_FUNCTION builtin, | 1515 // 5a. Call non-function via tail call to CALL_NON_FUNCTION builtin, |
1516 // or a function proxy via CALL_FUNCTION_PROXY. | 1516 // or a function proxy via CALL_FUNCTION_PROXY. |
1517 // r0: actual number of arguments | 1517 // r0: actual number of arguments |
1518 // r1: function | 1518 // r1: function |
1519 // r4: call type (0: JS function, 1: function proxy, 2: non-function) | 1519 // r4: call type (0: JS function, 1: function proxy, 2: non-function) |
1520 { Label function, non_proxy; | 1520 { Label function, non_proxy; |
1521 __ tst(r4, r4); | 1521 __ tst(r4, r4); |
1522 __ b(eq, &function); | 1522 __ b(eq, &function); |
1523 // Expected number of arguments is 0 for CALL_NON_FUNCTION. | 1523 // Expected number of arguments is 0 for CALL_NON_FUNCTION. |
1524 __ mov(r2, Operand(0, RelocInfo::NONE32)); | 1524 __ mov(r2, Operand::Zero()); |
1525 __ SetCallKind(r5, CALL_AS_METHOD); | 1525 __ SetCallKind(r5, CALL_AS_METHOD); |
1526 __ cmp(r4, Operand(1)); | 1526 __ cmp(r4, Operand(1)); |
1527 __ b(ne, &non_proxy); | 1527 __ b(ne, &non_proxy); |
1528 | 1528 |
1529 __ push(r1); // re-add proxy object as additional argument | 1529 __ push(r1); // re-add proxy object as additional argument |
1530 __ add(r0, r0, Operand(1)); | 1530 __ add(r0, r0, Operand(1)); |
1531 __ GetBuiltinEntry(r3, Builtins::CALL_FUNCTION_PROXY); | 1531 __ GetBuiltinEntry(r3, Builtins::CALL_FUNCTION_PROXY); |
1532 __ Jump(masm->isolate()->builtins()->ArgumentsAdaptorTrampoline(), | 1532 __ Jump(masm->isolate()->builtins()->ArgumentsAdaptorTrampoline(), |
1533 RelocInfo::CODE_TARGET); | 1533 RelocInfo::CODE_TARGET); |
1534 | 1534 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1592 // Out of stack space. | 1592 // Out of stack space. |
1593 __ ldr(r1, MemOperand(fp, kFunctionOffset)); | 1593 __ ldr(r1, MemOperand(fp, kFunctionOffset)); |
1594 __ push(r1); | 1594 __ push(r1); |
1595 __ push(r0); | 1595 __ push(r0); |
1596 __ InvokeBuiltin(Builtins::APPLY_OVERFLOW, CALL_FUNCTION); | 1596 __ InvokeBuiltin(Builtins::APPLY_OVERFLOW, CALL_FUNCTION); |
1597 // End of stack check. | 1597 // End of stack check. |
1598 | 1598 |
1599 // Push current limit and index. | 1599 // Push current limit and index. |
1600 __ bind(&okay); | 1600 __ bind(&okay); |
1601 __ push(r0); // limit | 1601 __ push(r0); // limit |
1602 __ mov(r1, Operand(0, RelocInfo::NONE32)); // initial index | 1602 __ mov(r1, Operand::Zero()); // initial index |
1603 __ push(r1); | 1603 __ push(r1); |
1604 | 1604 |
1605 // Get the receiver. | 1605 // Get the receiver. |
1606 __ ldr(r0, MemOperand(fp, kRecvOffset)); | 1606 __ ldr(r0, MemOperand(fp, kRecvOffset)); |
1607 | 1607 |
1608 // Check that the function is a JS function (otherwise it must be a proxy). | 1608 // Check that the function is a JS function (otherwise it must be a proxy). |
1609 Label push_receiver; | 1609 Label push_receiver; |
1610 __ ldr(r1, MemOperand(fp, kFunctionOffset)); | 1610 __ ldr(r1, MemOperand(fp, kFunctionOffset)); |
1611 __ CompareObjectType(r1, r2, r2, JS_FUNCTION_TYPE); | 1611 __ CompareObjectType(r1, r2, r2, JS_FUNCTION_TYPE); |
1612 __ b(ne, &push_receiver); | 1612 __ b(ne, &push_receiver); |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1704 NullCallWrapper(), CALL_AS_METHOD); | 1704 NullCallWrapper(), CALL_AS_METHOD); |
1705 | 1705 |
1706 frame_scope.GenerateLeaveFrame(); | 1706 frame_scope.GenerateLeaveFrame(); |
1707 __ add(sp, sp, Operand(3 * kPointerSize)); | 1707 __ add(sp, sp, Operand(3 * kPointerSize)); |
1708 __ Jump(lr); | 1708 __ Jump(lr); |
1709 | 1709 |
1710 // Invoke the function proxy. | 1710 // Invoke the function proxy. |
1711 __ bind(&call_proxy); | 1711 __ bind(&call_proxy); |
1712 __ push(r1); // add function proxy as last argument | 1712 __ push(r1); // add function proxy as last argument |
1713 __ add(r0, r0, Operand(1)); | 1713 __ add(r0, r0, Operand(1)); |
1714 __ mov(r2, Operand(0, RelocInfo::NONE32)); | 1714 __ mov(r2, Operand::Zero()); |
1715 __ SetCallKind(r5, CALL_AS_METHOD); | 1715 __ SetCallKind(r5, CALL_AS_METHOD); |
1716 __ GetBuiltinEntry(r3, Builtins::CALL_FUNCTION_PROXY); | 1716 __ GetBuiltinEntry(r3, Builtins::CALL_FUNCTION_PROXY); |
1717 __ Call(masm->isolate()->builtins()->ArgumentsAdaptorTrampoline(), | 1717 __ Call(masm->isolate()->builtins()->ArgumentsAdaptorTrampoline(), |
1718 RelocInfo::CODE_TARGET); | 1718 RelocInfo::CODE_TARGET); |
1719 | 1719 |
1720 // Tear down the internal frame and remove function, receiver and args. | 1720 // Tear down the internal frame and remove function, receiver and args. |
1721 } | 1721 } |
1722 __ add(sp, sp, Operand(3 * kPointerSize)); | 1722 __ add(sp, sp, Operand(3 * kPointerSize)); |
1723 __ Jump(lr); | 1723 __ Jump(lr); |
1724 } | 1724 } |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1852 __ bind(&dont_adapt_arguments); | 1852 __ bind(&dont_adapt_arguments); |
1853 __ Jump(r3); | 1853 __ Jump(r3); |
1854 } | 1854 } |
1855 | 1855 |
1856 | 1856 |
1857 #undef __ | 1857 #undef __ |
1858 | 1858 |
1859 } } // namespace v8::internal | 1859 } } // namespace v8::internal |
1860 | 1860 |
1861 #endif // V8_TARGET_ARCH_ARM | 1861 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |