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

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

Issue 177683002: Mode clean-up pt 1: rename classic/non-strict mode to sloppy mode (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 __ stop("stop_at"); 140 __ stop("stop_at");
141 } 141 }
142 #endif 142 #endif
143 143
144 // r1: Callee's JS function. 144 // r1: Callee's JS function.
145 // cp: Callee's context. 145 // cp: Callee's context.
146 // pp: Callee's constant pool pointer (if FLAG_enable_ool_constant_pool) 146 // pp: Callee's constant pool pointer (if FLAG_enable_ool_constant_pool)
147 // fp: Caller's frame pointer. 147 // fp: Caller's frame pointer.
148 // lr: Caller's pc. 148 // lr: Caller's pc.
149 149
150 // Classic mode functions and builtins need to replace the receiver with the 150 // Sloppy mode functions and builtins need to replace the receiver with the
151 // global proxy when called as functions (without an explicit receiver 151 // global proxy when called as functions (without an explicit receiver
152 // object). 152 // object).
153 if (info_->this_has_uses() && 153 if (info_->this_has_uses() &&
154 info_->is_classic_mode() && 154 info_->is_sloppy_mode() &&
155 !info_->is_native()) { 155 !info_->is_native()) {
156 Label ok; 156 Label ok;
157 int receiver_offset = info_->scope()->num_parameters() * kPointerSize; 157 int receiver_offset = info_->scope()->num_parameters() * kPointerSize;
158 __ ldr(r2, MemOperand(sp, receiver_offset)); 158 __ ldr(r2, MemOperand(sp, receiver_offset));
159 __ CompareRoot(r2, Heap::kUndefinedValueRootIndex); 159 __ CompareRoot(r2, Heap::kUndefinedValueRootIndex);
160 __ b(ne, &ok); 160 __ b(ne, &ok);
161 161
162 __ ldr(r2, GlobalObjectOperand()); 162 __ ldr(r2, GlobalObjectOperand());
163 __ ldr(r2, FieldMemOperand(r2, GlobalObject::kGlobalReceiverOffset)); 163 __ ldr(r2, FieldMemOperand(r2, GlobalObject::kGlobalReceiverOffset));
164 164
(...skipping 3040 matching lines...) Expand 10 before | Expand all | Expand 10 after
3205 case FLOAT64_ELEMENTS: 3205 case FLOAT64_ELEMENTS:
3206 case EXTERNAL_FLOAT32_ELEMENTS: 3206 case EXTERNAL_FLOAT32_ELEMENTS:
3207 case EXTERNAL_FLOAT64_ELEMENTS: 3207 case EXTERNAL_FLOAT64_ELEMENTS:
3208 case FAST_HOLEY_DOUBLE_ELEMENTS: 3208 case FAST_HOLEY_DOUBLE_ELEMENTS:
3209 case FAST_HOLEY_ELEMENTS: 3209 case FAST_HOLEY_ELEMENTS:
3210 case FAST_HOLEY_SMI_ELEMENTS: 3210 case FAST_HOLEY_SMI_ELEMENTS:
3211 case FAST_DOUBLE_ELEMENTS: 3211 case FAST_DOUBLE_ELEMENTS:
3212 case FAST_ELEMENTS: 3212 case FAST_ELEMENTS:
3213 case FAST_SMI_ELEMENTS: 3213 case FAST_SMI_ELEMENTS:
3214 case DICTIONARY_ELEMENTS: 3214 case DICTIONARY_ELEMENTS:
3215 case NON_STRICT_ARGUMENTS_ELEMENTS: 3215 case SLOPPY_ARGUMENTS_ELEMENTS:
3216 UNREACHABLE(); 3216 UNREACHABLE();
3217 break; 3217 break;
3218 } 3218 }
3219 } 3219 }
3220 } 3220 }
3221 3221
3222 3222
3223 void LCodeGen::DoLoadKeyedFixedDoubleArray(LLoadKeyed* instr) { 3223 void LCodeGen::DoLoadKeyedFixedDoubleArray(LLoadKeyed* instr) {
3224 Register elements = ToRegister(instr->elements()); 3224 Register elements = ToRegister(instr->elements());
3225 bool key_is_constant = instr->key()->IsConstantOperand(); 3225 bool key_is_constant = instr->key()->IsConstantOperand();
(...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after
4248 case FLOAT64_ELEMENTS: 4248 case FLOAT64_ELEMENTS:
4249 case EXTERNAL_FLOAT32_ELEMENTS: 4249 case EXTERNAL_FLOAT32_ELEMENTS:
4250 case EXTERNAL_FLOAT64_ELEMENTS: 4250 case EXTERNAL_FLOAT64_ELEMENTS:
4251 case FAST_DOUBLE_ELEMENTS: 4251 case FAST_DOUBLE_ELEMENTS:
4252 case FAST_ELEMENTS: 4252 case FAST_ELEMENTS:
4253 case FAST_SMI_ELEMENTS: 4253 case FAST_SMI_ELEMENTS:
4254 case FAST_HOLEY_DOUBLE_ELEMENTS: 4254 case FAST_HOLEY_DOUBLE_ELEMENTS:
4255 case FAST_HOLEY_ELEMENTS: 4255 case FAST_HOLEY_ELEMENTS:
4256 case FAST_HOLEY_SMI_ELEMENTS: 4256 case FAST_HOLEY_SMI_ELEMENTS:
4257 case DICTIONARY_ELEMENTS: 4257 case DICTIONARY_ELEMENTS:
4258 case NON_STRICT_ARGUMENTS_ELEMENTS: 4258 case SLOPPY_ARGUMENTS_ELEMENTS:
4259 UNREACHABLE(); 4259 UNREACHABLE();
4260 break; 4260 break;
4261 } 4261 }
4262 } 4262 }
4263 } 4263 }
4264 4264
4265 4265
4266 void LCodeGen::DoStoreKeyedFixedDoubleArray(LStoreKeyed* instr) { 4266 void LCodeGen::DoStoreKeyedFixedDoubleArray(LStoreKeyed* instr) {
4267 DwVfpRegister value = ToDoubleRegister(instr->value()); 4267 DwVfpRegister value = ToDoubleRegister(instr->value());
4268 Register elements = ToRegister(instr->elements()); 4268 Register elements = ToRegister(instr->elements());
(...skipping 1473 matching lines...) Expand 10 before | Expand all | Expand 10 after
5742 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); 5742 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index));
5743 __ ldr(result, FieldMemOperand(scratch, 5743 __ ldr(result, FieldMemOperand(scratch,
5744 FixedArray::kHeaderSize - kPointerSize)); 5744 FixedArray::kHeaderSize - kPointerSize));
5745 __ bind(&done); 5745 __ bind(&done);
5746 } 5746 }
5747 5747
5748 5748
5749 #undef __ 5749 #undef __
5750 5750
5751 } } // namespace v8::internal 5751 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.h ('k') | src/array.js » ('j') | src/globals.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698