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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 // Preserve the two incoming parameters on the stack. | 369 // Preserve the two incoming parameters on the stack. |
370 __ SmiTag(r0); | 370 __ SmiTag(r0); |
371 __ push(r0); // Smi-tagged arguments count. | 371 __ push(r0); // Smi-tagged arguments count. |
372 __ push(r1); // Constructor function. | 372 __ push(r1); // Constructor function. |
373 | 373 |
374 // Try to allocate the object without transitioning into C code. If any of | 374 // Try to allocate the object without transitioning into C code. If any of |
375 // the preconditions is not met, the code bails out to the runtime call. | 375 // the preconditions is not met, the code bails out to the runtime call. |
376 Label rt_call, allocated; | 376 Label rt_call, allocated; |
377 if (FLAG_inline_new) { | 377 if (FLAG_inline_new) { |
378 Label undo_allocation; | 378 Label undo_allocation; |
379 #ifdef ENABLE_DEBUGGER_SUPPORT | |
380 ExternalReference debug_step_in_fp = | 379 ExternalReference debug_step_in_fp = |
381 ExternalReference::debug_step_in_fp_address(isolate); | 380 ExternalReference::debug_step_in_fp_address(isolate); |
382 __ mov(r2, Operand(debug_step_in_fp)); | 381 __ mov(r2, Operand(debug_step_in_fp)); |
383 __ ldr(r2, MemOperand(r2)); | 382 __ ldr(r2, MemOperand(r2)); |
384 __ tst(r2, r2); | 383 __ tst(r2, r2); |
385 __ b(ne, &rt_call); | 384 __ b(ne, &rt_call); |
386 #endif | |
387 | 385 |
388 // Load the initial map and verify that it is in fact a map. | 386 // Load the initial map and verify that it is in fact a map. |
389 // r1: constructor function | 387 // r1: constructor function |
390 __ ldr(r2, FieldMemOperand(r1, JSFunction::kPrototypeOrInitialMapOffset)); | 388 __ ldr(r2, FieldMemOperand(r1, JSFunction::kPrototypeOrInitialMapOffset)); |
391 __ JumpIfSmi(r2, &rt_call); | 389 __ JumpIfSmi(r2, &rt_call); |
392 __ CompareObjectType(r2, r3, r4, MAP_TYPE); | 390 __ CompareObjectType(r2, r3, r4, MAP_TYPE); |
393 __ b(ne, &rt_call); | 391 __ b(ne, &rt_call); |
394 | 392 |
395 // Check that the constructor is not constructing a JSFunction (see | 393 // Check that the constructor is not constructing a JSFunction (see |
396 // comments in Runtime_NewObject in runtime.cc). In which case the | 394 // comments in Runtime_NewObject in runtime.cc). In which case the |
(...skipping 1179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1576 __ bkpt(0); | 1574 __ bkpt(0); |
1577 } | 1575 } |
1578 } | 1576 } |
1579 | 1577 |
1580 | 1578 |
1581 #undef __ | 1579 #undef __ |
1582 | 1580 |
1583 } } // namespace v8::internal | 1581 } } // namespace v8::internal |
1584 | 1582 |
1585 #endif // V8_TARGET_ARCH_ARM | 1583 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |