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

Side by Side Diff: src/hydrogen.cc

Issue 137693003: Remove ArrayPush from the custom call generators, and instead call directly to the handler in crank… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Set up the platform-specific descriptor on ARM Created 6 years, 11 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 | « src/arm/code-stubs-arm.cc ('k') | src/ia32/code-stubs-ia32.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 7643 matching lines...) Expand 10 before | Expand all | Expand 10 after
7654 AddElementAccess( 7654 AddElementAccess(
7655 elements, reduced_length, hole, bounds_check, elements_kind, true); 7655 elements, reduced_length, hole, bounds_check, elements_kind, true);
7656 } 7656 }
7657 Add<HStoreNamedField>( 7657 Add<HStoreNamedField>(
7658 checked_object, HObjectAccess::ForArrayLength(elements_kind), 7658 checked_object, HObjectAccess::ForArrayLength(elements_kind),
7659 reduced_length); 7659 reduced_length);
7660 Add<HSimulate>(expr->id(), REMOVABLE_SIMULATE); 7660 Add<HSimulate>(expr->id(), REMOVABLE_SIMULATE);
7661 ast_context()->ReturnValue(result); 7661 ast_context()->ReturnValue(result);
7662 return true; 7662 return true;
7663 } 7663 }
7664 case kArrayPush: {
7665 if (!expr->IsMonomorphic() || expr->check_type() != RECEIVER_MAP_CHECK) {
7666 return false;
7667 }
7668 if (receiver_map->instance_type() != JS_ARRAY_TYPE) return false;
7669 ElementsKind elements_kind = receiver_map->elements_kind();
7670 if (!IsFastElementsKind(elements_kind)) return false;
7671 AddCheckConstantFunction(expr->holder(), receiver, receiver_map);
7672
7673 HValue* op_vals[] = {
7674 context(),
7675 // Receiver.
7676 environment()->ExpressionStackAt(expr->arguments()->length())
7677 };
7678
7679 const int argc = expr->arguments()->length();
7680 // Includes receiver.
7681 PushArgumentsFromEnvironment(argc + 1);
7682
7683 CallInterfaceDescriptor* descriptor =
7684 isolate()->call_descriptor(Isolate::CallHandler);
7685
7686 ArrayPushStub stub(receiver_map->elements_kind(), argc);
7687 Handle<Code> code = stub.GetCode(isolate());
7688 HConstant* code_value = Add<HConstant>(code);
7689
7690 HInstruction* call = New<HCallWithDescriptor>(
7691 code_value, argc + 1, descriptor,
7692 Vector<HValue*>(op_vals, descriptor->environment_length()));
mvstanton 2014/01/23 09:17:03 ASSERT that op_vals[] length and descriptor->envir
7693 ast_context()->ReturnInstruction(call, expr->id());
7694 return true;
7695 }
7664 default: 7696 default:
7665 // Not yet supported for inlining. 7697 // Not yet supported for inlining.
7666 break; 7698 break;
7667 } 7699 }
7668 return false; 7700 return false;
7669 } 7701 }
7670 7702
7671 7703
7672 bool HOptimizedGraphBuilder::TryCallApply(Call* expr) { 7704 bool HOptimizedGraphBuilder::TryCallApply(Call* expr) {
7673 Expression* callee = expr->expression(); 7705 Expression* callee = expr->expression();
(...skipping 3379 matching lines...) Expand 10 before | Expand all | Expand 10 after
11053 if (ShouldProduceTraceOutput()) { 11085 if (ShouldProduceTraceOutput()) {
11054 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 11086 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
11055 } 11087 }
11056 11088
11057 #ifdef DEBUG 11089 #ifdef DEBUG
11058 graph_->Verify(false); // No full verify. 11090 graph_->Verify(false); // No full verify.
11059 #endif 11091 #endif
11060 } 11092 }
11061 11093
11062 } } // namespace v8::internal 11094 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698