OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/compiler/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
6 #include "src/compiler/code-generator-impl.h" | 6 #include "src/compiler/code-generator-impl.h" |
7 #include "src/compiler/gap-resolver.h" | 7 #include "src/compiler/gap-resolver.h" |
8 #include "src/compiler/node-matchers.h" | 8 #include "src/compiler/node-matchers.h" |
9 #include "src/mips/macro-assembler-mips.h" | 9 #include "src/mips/macro-assembler-mips.h" |
10 #include "src/scopes.h" | 10 #include "src/scopes.h" |
(...skipping 1043 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1054 } else if (descriptor->IsJSFunctionCall()) { | 1054 } else if (descriptor->IsJSFunctionCall()) { |
1055 CompilationInfo* info = this->info(); | 1055 CompilationInfo* info = this->info(); |
1056 __ Prologue(info->IsCodePreAgingActive()); | 1056 __ Prologue(info->IsCodePreAgingActive()); |
1057 frame()->SetRegisterSaveAreaSize( | 1057 frame()->SetRegisterSaveAreaSize( |
1058 StandardFrameConstants::kFixedFrameSizeFromFp); | 1058 StandardFrameConstants::kFixedFrameSizeFromFp); |
1059 | 1059 |
1060 // Sloppy mode functions and builtins need to replace the receiver with the | 1060 // Sloppy mode functions and builtins need to replace the receiver with the |
1061 // global proxy when called as functions (without an explicit receiver | 1061 // global proxy when called as functions (without an explicit receiver |
1062 // object). | 1062 // object). |
1063 // TODO(mstarzinger/verwaest): Should this be moved back into the CallIC? | 1063 // TODO(mstarzinger/verwaest): Should this be moved back into the CallIC? |
1064 if (info->strict_mode() == SLOPPY && !info->is_native()) { | 1064 if (is_sloppy(info->language_mode()) && !info->is_native()) { |
1065 Label ok; | 1065 Label ok; |
1066 // +2 for return address and saved frame pointer. | 1066 // +2 for return address and saved frame pointer. |
1067 int receiver_slot = info->scope()->num_parameters() + 2; | 1067 int receiver_slot = info->scope()->num_parameters() + 2; |
1068 __ ld(a2, MemOperand(fp, receiver_slot * kPointerSize)); | 1068 __ ld(a2, MemOperand(fp, receiver_slot * kPointerSize)); |
1069 __ LoadRoot(at, Heap::kUndefinedValueRootIndex); | 1069 __ LoadRoot(at, Heap::kUndefinedValueRootIndex); |
1070 __ Branch(&ok, ne, a2, Operand(at)); | 1070 __ Branch(&ok, ne, a2, Operand(at)); |
1071 | 1071 |
1072 __ ld(a2, GlobalObjectOperand()); | 1072 __ ld(a2, GlobalObjectOperand()); |
1073 __ ld(a2, FieldMemOperand(a2, GlobalObject::kGlobalProxyOffset)); | 1073 __ ld(a2, FieldMemOperand(a2, GlobalObject::kGlobalProxyOffset)); |
1074 __ sd(a2, MemOperand(fp, receiver_slot * kPointerSize)); | 1074 __ sd(a2, MemOperand(fp, receiver_slot * kPointerSize)); |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1319 } | 1319 } |
1320 } | 1320 } |
1321 MarkLazyDeoptSite(); | 1321 MarkLazyDeoptSite(); |
1322 } | 1322 } |
1323 | 1323 |
1324 #undef __ | 1324 #undef __ |
1325 | 1325 |
1326 } // namespace compiler | 1326 } // namespace compiler |
1327 } // namespace internal | 1327 } // namespace internal |
1328 } // namespace v8 | 1328 } // namespace v8 |
OLD | NEW |