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

Side by Side Diff: src/x64/lithium-codegen-x64.cc

Issue 6691003: Strict mode poision pills. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 9 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 | Annotate | Revision Log
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 3409 matching lines...) Expand 10 before | Expand all | Expand 10 after
3420 __ movq(FieldOperand(rax, size - kPointerSize), rdx); 3420 __ movq(FieldOperand(rax, size - kPointerSize), rdx);
3421 } 3421 }
3422 } 3422 }
3423 3423
3424 3424
3425 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) { 3425 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) {
3426 // Use the fast case closure allocation code that allocates in new 3426 // Use the fast case closure allocation code that allocates in new
3427 // space for nested functions that don't need literals cloning. 3427 // space for nested functions that don't need literals cloning.
3428 Handle<SharedFunctionInfo> shared_info = instr->shared_info(); 3428 Handle<SharedFunctionInfo> shared_info = instr->shared_info();
3429 bool pretenure = instr->hydrogen()->pretenure(); 3429 bool pretenure = instr->hydrogen()->pretenure();
3430 if (shared_info->num_literals() == 0 && !pretenure) { 3430 if (!pretenure && shared_info->num_literals() == 0 &&
3431 !shared_info->strict_mode()) {
3431 FastNewClosureStub stub; 3432 FastNewClosureStub stub;
3432 __ Push(shared_info); 3433 __ Push(shared_info);
3433 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); 3434 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
3434 } else { 3435 } else {
3435 __ push(rsi); 3436 __ push(rsi);
3436 __ Push(shared_info); 3437 __ Push(shared_info);
3437 __ PushRoot(pretenure ? 3438 __ PushRoot(pretenure ?
3438 Heap::kTrueValueRootIndex : 3439 Heap::kTrueValueRootIndex :
3439 Heap::kFalseValueRootIndex); 3440 Heap::kFalseValueRootIndex);
3440 CallRuntime(Runtime::kNewClosure, 3, instr); 3441 CallRuntime(Runtime::kNewClosure, 3, instr);
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
3694 RegisterEnvironmentForDeoptimization(environment); 3695 RegisterEnvironmentForDeoptimization(environment);
3695 ASSERT(osr_pc_offset_ == -1); 3696 ASSERT(osr_pc_offset_ == -1);
3696 osr_pc_offset_ = masm()->pc_offset(); 3697 osr_pc_offset_ = masm()->pc_offset();
3697 } 3698 }
3698 3699
3699 #undef __ 3700 #undef __
3700 3701
3701 } } // namespace v8::internal 3702 } } // namespace v8::internal
3702 3703
3703 #endif // V8_TARGET_ARCH_X64 3704 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698