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

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

Issue 8574058: Add version of x64 FastCloneShallowArrayStub that copies all boilerplate kinds (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: review feedback Created 9 years, 1 month 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 | « src/ia32/code-stubs-ia32.cc ('k') | src/x64/code-stubs-x64.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 1459 matching lines...) Expand 10 before | Expand all | Expand 10 after
1470 } 1470 }
1471 1471
1472 1472
1473 void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) { 1473 void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) {
1474 Comment cmnt(masm_, "[ ArrayLiteral"); 1474 Comment cmnt(masm_, "[ ArrayLiteral");
1475 1475
1476 ZoneList<Expression*>* subexprs = expr->values(); 1476 ZoneList<Expression*>* subexprs = expr->values();
1477 int length = subexprs->length(); 1477 int length = subexprs->length();
1478 Handle<FixedArray> constant_elements = expr->constant_elements(); 1478 Handle<FixedArray> constant_elements = expr->constant_elements();
1479 ASSERT_EQ(2, constant_elements->length()); 1479 ASSERT_EQ(2, constant_elements->length());
1480 #if DEBUG
1481 ElementsKind constant_elements_kind =
1482 static_cast<ElementsKind>(Smi::cast(constant_elements->get(0))->value());
1483 #endif
1480 Handle<FixedArrayBase> constant_elements_values( 1484 Handle<FixedArrayBase> constant_elements_values(
1481 FixedArrayBase::cast(constant_elements->get(1))); 1485 FixedArrayBase::cast(constant_elements->get(1)));
1482 1486
1483 __ mov(ebx, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); 1487 __ mov(ebx, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset));
1484 __ push(FieldOperand(ebx, JSFunction::kLiteralsOffset)); 1488 __ push(FieldOperand(ebx, JSFunction::kLiteralsOffset));
1485 __ push(Immediate(Smi::FromInt(expr->literal_index()))); 1489 __ push(Immediate(Smi::FromInt(expr->literal_index())));
1486 __ push(Immediate(constant_elements)); 1490 __ push(Immediate(constant_elements));
1487 if (expr->depth() > 1) { 1491 if (expr->depth() > 1) {
1488 __ CallRuntime(Runtime::kCreateArrayLiteral, 3); 1492 __ CallRuntime(Runtime::kCreateArrayLiteral, 3);
1489 } else if (length > FastCloneShallowArrayStub::kMaximumClonedLength) { 1493 } else if (length > FastCloneShallowArrayStub::kMaximumClonedLength) {
(...skipping 2846 matching lines...) Expand 10 before | Expand all | Expand 10 after
4336 *context_length = 0; 4340 *context_length = 0;
4337 return previous_; 4341 return previous_;
4338 } 4342 }
4339 4343
4340 4344
4341 #undef __ 4345 #undef __
4342 4346
4343 } } // namespace v8::internal 4347 } } // namespace v8::internal
4344 4348
4345 #endif // V8_TARGET_ARCH_IA32 4349 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698