Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(310)

Side by Side Diff: src/mips/full-codegen-mips.cc

Issue 9298014: MIPS: Implement target cache for constructor calls. (Closed)
Patch Set: Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/mips/debug-mips.cc ('k') | src/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2385 matching lines...) Expand 10 before | Expand all | Expand 10 after
2396 } 2396 }
2397 2397
2398 // Call the construct call builtin that handles allocation and 2398 // Call the construct call builtin that handles allocation and
2399 // constructor invocation. 2399 // constructor invocation.
2400 SetSourcePosition(expr->position()); 2400 SetSourcePosition(expr->position());
2401 2401
2402 // Load function and argument count into a1 and a0. 2402 // Load function and argument count into a1 and a0.
2403 __ li(a0, Operand(arg_count)); 2403 __ li(a0, Operand(arg_count));
2404 __ lw(a1, MemOperand(sp, arg_count * kPointerSize)); 2404 __ lw(a1, MemOperand(sp, arg_count * kPointerSize));
2405 2405
2406 Handle<Code> construct_builtin = 2406 // Record call targets in unoptimized code, but not in the snapshot.
2407 isolate()->builtins()->JSConstructCall(); 2407 CallFunctionFlags flags;
2408 __ Call(construct_builtin, RelocInfo::CONSTRUCT_CALL); 2408 if (!Serializer::enabled()) {
2409 flags = RECORD_CALL_TARGET;
2410 Handle<Object> uninitialized =
2411 TypeFeedbackCells::UninitializedSentinel(isolate());
2412 Handle<JSGlobalPropertyCell> cell =
2413 isolate()->factory()->NewJSGlobalPropertyCell(uninitialized);
2414 RecordTypeFeedbackCell(expr->id(), cell);
2415 __ li(a2, Operand(cell));
2416 } else {
2417 flags = NO_CALL_FUNCTION_FLAGS;
2418 }
2419
2420 CallConstructStub stub(flags);
2421 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL);
2409 context()->Plug(v0); 2422 context()->Plug(v0);
2410 } 2423 }
2411 2424
2412 2425
2413 void FullCodeGenerator::EmitIsSmi(CallRuntime* expr) { 2426 void FullCodeGenerator::EmitIsSmi(CallRuntime* expr) {
2414 ZoneList<Expression*>* args = expr->arguments(); 2427 ZoneList<Expression*>* args = expr->arguments();
2415 ASSERT(args->length() == 1); 2428 ASSERT(args->length() == 1);
2416 2429
2417 VisitForAccumulatorValue(args->at(0)); 2430 VisitForAccumulatorValue(args->at(0));
2418 2431
(...skipping 2007 matching lines...) Expand 10 before | Expand all | Expand 10 after
4426 *context_length = 0; 4439 *context_length = 0;
4427 return previous_; 4440 return previous_;
4428 } 4441 }
4429 4442
4430 4443
4431 #undef __ 4444 #undef __
4432 4445
4433 } } // namespace v8::internal 4446 } } // namespace v8::internal
4434 4447
4435 #endif // V8_TARGET_ARCH_MIPS 4448 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/debug-mips.cc ('k') | src/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698