OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 __ SmiTag(argc); | 363 __ SmiTag(argc); |
364 __ Push(argc, constructor); | 364 __ Push(argc, constructor); |
365 // sp[0] : Constructor function. | 365 // sp[0] : Constructor function. |
366 // sp[1]: number of arguments (smi-tagged) | 366 // sp[1]: number of arguments (smi-tagged) |
367 | 367 |
368 // Try to allocate the object without transitioning into C code. If any of | 368 // Try to allocate the object without transitioning into C code. If any of |
369 // the preconditions is not met, the code bails out to the runtime call. | 369 // the preconditions is not met, the code bails out to the runtime call. |
370 Label rt_call, allocated; | 370 Label rt_call, allocated; |
371 if (FLAG_inline_new) { | 371 if (FLAG_inline_new) { |
372 Label undo_allocation; | 372 Label undo_allocation; |
373 #if ENABLE_DEBUGGER_SUPPORT | |
374 ExternalReference debug_step_in_fp = | 373 ExternalReference debug_step_in_fp = |
375 ExternalReference::debug_step_in_fp_address(isolate); | 374 ExternalReference::debug_step_in_fp_address(isolate); |
376 __ Mov(x2, Operand(debug_step_in_fp)); | 375 __ Mov(x2, Operand(debug_step_in_fp)); |
377 __ Ldr(x2, MemOperand(x2)); | 376 __ Ldr(x2, MemOperand(x2)); |
378 __ Cbnz(x2, &rt_call); | 377 __ Cbnz(x2, &rt_call); |
379 #endif | |
380 // Load the initial map and verify that it is in fact a map. | 378 // Load the initial map and verify that it is in fact a map. |
381 Register init_map = x2; | 379 Register init_map = x2; |
382 __ Ldr(init_map, | 380 __ Ldr(init_map, |
383 FieldMemOperand(constructor, | 381 FieldMemOperand(constructor, |
384 JSFunction::kPrototypeOrInitialMapOffset)); | 382 JSFunction::kPrototypeOrInitialMapOffset)); |
385 __ JumpIfSmi(init_map, &rt_call); | 383 __ JumpIfSmi(init_map, &rt_call); |
386 __ JumpIfNotObjectType(init_map, x10, x11, MAP_TYPE, &rt_call); | 384 __ JumpIfNotObjectType(init_map, x10, x11, MAP_TYPE, &rt_call); |
387 | 385 |
388 // Check that the constructor is not constructing a JSFunction (see | 386 // Check that the constructor is not constructing a JSFunction (see |
389 // comments in Runtime_NewObject in runtime.cc). In which case the initial | 387 // comments in Runtime_NewObject in runtime.cc). In which case the initial |
(...skipping 1195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1585 __ Unreachable(); | 1583 __ Unreachable(); |
1586 } | 1584 } |
1587 } | 1585 } |
1588 | 1586 |
1589 | 1587 |
1590 #undef __ | 1588 #undef __ |
1591 | 1589 |
1592 } } // namespace v8::internal | 1590 } } // namespace v8::internal |
1593 | 1591 |
1594 #endif // V8_TARGET_ARCH_ARM | 1592 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |