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

Unified Diff: src/runtime.cc

Issue 8002019: Add Crankshaft support for smi-only elements (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments, added tests Created 9 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ic.cc ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 4a662f86a31e1c232c465df96e7267a770d96047..a899aead55a8b3f35f9d39373edc107004292825 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -443,7 +443,7 @@ static Handle<Object> CreateArrayLiteralBoilerplate(
for (int i = 0; i < content->length(); i++) {
Object* current = content->get(i);
ASSERT(!current->IsFixedArray());
- if (!current->IsSmi()) {
+ if (!current->IsSmi() && !current->IsTheHole()) {
has_non_smi = true;
}
}
@@ -467,7 +467,7 @@ static Handle<Object> CreateArrayLiteralBoilerplate(
content->set(i, *result);
has_non_smi = true;
} else {
- if (!current->IsSmi()) {
+ if (!current->IsSmi() && !current->IsTheHole()) {
has_non_smi = true;
}
}
@@ -8250,6 +8250,8 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_OptimizeFunctionOnNextCall) {
RUNTIME_FUNCTION(MaybeObject*, Runtime_GetOptimizationStatus) {
HandleScope scope(isolate);
ASSERT(args.length() == 1);
+ // The least significant bit (after untagging) indicates whether the
+ // function is currently optimized, regardless of reason.
if (!V8::UseCrankshaft()) {
return Smi::FromInt(4); // 4 == "never".
}
« no previous file with comments | « src/ic.cc ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698