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

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

Issue 303021: Added support for array literals to the toplevel compiler. They are... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 2 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
« no previous file with comments | « no previous file | src/arm/fast-codegen-arm.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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 1154 matching lines...) Expand 10 before | Expand all | Expand 10 after
1165 if (node->break_target()->is_linked()) { 1165 if (node->break_target()->is_linked()) {
1166 node->break_target()->Bind(); 1166 node->break_target()->Bind();
1167 } 1167 }
1168 node->break_target()->Unuse(); 1168 node->break_target()->Unuse();
1169 ASSERT(!has_valid_frame() || frame_->height() == original_height); 1169 ASSERT(!has_valid_frame() || frame_->height() == original_height);
1170 } 1170 }
1171 1171
1172 1172
1173 void CodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { 1173 void CodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) {
1174 VirtualFrame::SpilledScope spilled_scope; 1174 VirtualFrame::SpilledScope spilled_scope;
1175 frame_->EmitPush(cp);
1175 __ mov(r0, Operand(pairs)); 1176 __ mov(r0, Operand(pairs));
1176 frame_->EmitPush(r0); 1177 frame_->EmitPush(r0);
1177 frame_->EmitPush(cp);
1178 __ mov(r0, Operand(Smi::FromInt(is_eval() ? 1 : 0))); 1178 __ mov(r0, Operand(Smi::FromInt(is_eval() ? 1 : 0)));
1179 frame_->EmitPush(r0); 1179 frame_->EmitPush(r0);
1180 frame_->CallRuntime(Runtime::kDeclareGlobals, 3); 1180 frame_->CallRuntime(Runtime::kDeclareGlobals, 3);
1181 // The result is discarded. 1181 // The result is discarded.
1182 } 1182 }
1183 1183
1184 1184
1185 void CodeGenerator::VisitDeclaration(Declaration* node) { 1185 void CodeGenerator::VisitDeclaration(Declaration* node) {
1186 #ifdef DEBUG 1186 #ifdef DEBUG
1187 int original_height = frame_->height(); 1187 int original_height = frame_->height();
(...skipping 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after
2248 #endif 2248 #endif
2249 // Ignore the return value. 2249 // Ignore the return value.
2250 ASSERT(frame_->height() == original_height); 2250 ASSERT(frame_->height() == original_height);
2251 } 2251 }
2252 2252
2253 2253
2254 void CodeGenerator::InstantiateBoilerplate(Handle<JSFunction> boilerplate) { 2254 void CodeGenerator::InstantiateBoilerplate(Handle<JSFunction> boilerplate) {
2255 VirtualFrame::SpilledScope spilled_scope; 2255 VirtualFrame::SpilledScope spilled_scope;
2256 ASSERT(boilerplate->IsBoilerplate()); 2256 ASSERT(boilerplate->IsBoilerplate());
2257 2257
2258 // Push the boilerplate on the stack. 2258 // Create a new closure.
2259 frame_->EmitPush(cp);
2259 __ mov(r0, Operand(boilerplate)); 2260 __ mov(r0, Operand(boilerplate));
2260 frame_->EmitPush(r0); 2261 frame_->EmitPush(r0);
2261
2262 // Create a new closure.
2263 frame_->EmitPush(cp);
2264 frame_->CallRuntime(Runtime::kNewClosure, 2); 2262 frame_->CallRuntime(Runtime::kNewClosure, 2);
2265 frame_->EmitPush(r0); 2263 frame_->EmitPush(r0);
2266 } 2264 }
2267 2265
2268 2266
2269 void CodeGenerator::VisitFunctionLiteral(FunctionLiteral* node) { 2267 void CodeGenerator::VisitFunctionLiteral(FunctionLiteral* node) {
2270 #ifdef DEBUG 2268 #ifdef DEBUG
2271 int original_height = frame_->height(); 2269 int original_height = frame_->height();
2272 #endif 2270 #endif
2273 VirtualFrame::SpilledScope spilled_scope; 2271 VirtualFrame::SpilledScope spilled_scope;
(...skipping 3991 matching lines...) Expand 10 before | Expand all | Expand 10 after
6265 int CompareStub::MinorKey() { 6263 int CompareStub::MinorKey() {
6266 // Encode the two parameters in a unique 16 bit value. 6264 // Encode the two parameters in a unique 16 bit value.
6267 ASSERT(static_cast<unsigned>(cc_) >> 28 < (1 << 15)); 6265 ASSERT(static_cast<unsigned>(cc_) >> 28 < (1 << 15));
6268 return (static_cast<unsigned>(cc_) >> 27) | (strict_ ? 1 : 0); 6266 return (static_cast<unsigned>(cc_) >> 27) | (strict_ ? 1 : 0);
6269 } 6267 }
6270 6268
6271 6269
6272 #undef __ 6270 #undef __
6273 6271
6274 } } // namespace v8::internal 6272 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/arm/fast-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698