OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 2361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2372 } | 2372 } |
2373 | 2373 |
2374 // Call the construct call builtin that handles allocation and | 2374 // Call the construct call builtin that handles allocation and |
2375 // constructor invocation. | 2375 // constructor invocation. |
2376 SetSourcePosition(expr->position()); | 2376 SetSourcePosition(expr->position()); |
2377 | 2377 |
2378 // Load function and argument count into r1 and r0. | 2378 // Load function and argument count into r1 and r0. |
2379 __ mov(r0, Operand(arg_count)); | 2379 __ mov(r0, Operand(arg_count)); |
2380 __ ldr(r1, MemOperand(sp, arg_count * kPointerSize)); | 2380 __ ldr(r1, MemOperand(sp, arg_count * kPointerSize)); |
2381 | 2381 |
2382 Handle<Code> construct_builtin = | 2382 // Record call targets in unoptimized code, but not in the snapshot. |
2383 isolate()->builtins()->JSConstructCall(); | 2383 CallFunctionFlags flags; |
2384 __ Call(construct_builtin, RelocInfo::CONSTRUCT_CALL); | 2384 if (!Serializer::enabled()) { |
| 2385 flags = RECORD_CALL_TARGET; |
| 2386 Handle<Object> uninitialized = |
| 2387 TypeFeedbackCells::UninitializedSentinel(isolate()); |
| 2388 Handle<JSGlobalPropertyCell> cell = |
| 2389 isolate()->factory()->NewJSGlobalPropertyCell(uninitialized); |
| 2390 RecordTypeFeedbackCell(expr->id(), cell); |
| 2391 __ mov(r2, Operand(cell)); |
| 2392 } else { |
| 2393 flags = NO_CALL_FUNCTION_FLAGS; |
| 2394 } |
| 2395 |
| 2396 CallConstructStub stub(flags); |
| 2397 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); |
2385 context()->Plug(r0); | 2398 context()->Plug(r0); |
2386 } | 2399 } |
2387 | 2400 |
2388 | 2401 |
2389 void FullCodeGenerator::EmitIsSmi(CallRuntime* expr) { | 2402 void FullCodeGenerator::EmitIsSmi(CallRuntime* expr) { |
2390 ZoneList<Expression*>* args = expr->arguments(); | 2403 ZoneList<Expression*>* args = expr->arguments(); |
2391 ASSERT(args->length() == 1); | 2404 ASSERT(args->length() == 1); |
2392 | 2405 |
2393 VisitForAccumulatorValue(args->at(0)); | 2406 VisitForAccumulatorValue(args->at(0)); |
2394 | 2407 |
(...skipping 1995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4390 *context_length = 0; | 4403 *context_length = 0; |
4391 return previous_; | 4404 return previous_; |
4392 } | 4405 } |
4393 | 4406 |
4394 | 4407 |
4395 #undef __ | 4408 #undef __ |
4396 | 4409 |
4397 } } // namespace v8::internal | 4410 } } // namespace v8::internal |
4398 | 4411 |
4399 #endif // V8_TARGET_ARCH_ARM | 4412 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |