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

Unified Diff: src/compiler/ast-graph-builder.cc

Issue 886853002: Avoid using ProcessArguments for static calls. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased. Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/ast-graph-builder.cc
diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc
index 9c0b1113251585d31b50a05e0ecad2f026852f6e..9e8b951b04f36eb0bf1fbe981f92661f8ecaead0 100644
--- a/src/compiler/ast-graph-builder.cc
+++ b/src/compiler/ast-graph-builder.cc
@@ -667,24 +667,20 @@ void AstGraphBuilder::VisitForInStatement(ForInStatement* stmt) {
PrepareFrameState(obj, stmt->ToObjectId(), OutputFrameStateCombine::Push());
environment()->Push(obj);
// TODO(dcarney): should do a fast enum cache check here to skip runtime.
- environment()->Push(obj);
- Node* cache_type = ProcessArguments(
- javascript()->CallRuntime(Runtime::kGetPropertyNamesFast, 1), 1);
+ Node* cache_type = NewNode(
+ javascript()->CallRuntime(Runtime::kGetPropertyNamesFast, 1), obj);
PrepareFrameState(cache_type, stmt->EnumId(),
OutputFrameStateCombine::Push());
// TODO(dcarney): these next runtime calls should be removed in favour of
// a few simplified instructions.
- environment()->Push(obj);
- environment()->Push(cache_type);
- Node* cache_pair =
- ProcessArguments(javascript()->CallRuntime(Runtime::kForInInit, 2), 2);
+ Node* cache_pair = NewNode(
+ javascript()->CallRuntime(Runtime::kForInInit, 2), obj, cache_type);
// cache_type may have been replaced.
Node* cache_array = NewNode(common()->Projection(0), cache_pair);
cache_type = NewNode(common()->Projection(1), cache_pair);
- environment()->Push(cache_type);
- environment()->Push(cache_array);
- Node* cache_length = ProcessArguments(
- javascript()->CallRuntime(Runtime::kForInCacheArrayLength, 2), 2);
+ Node* cache_length =
+ NewNode(javascript()->CallRuntime(Runtime::kForInCacheArrayLength, 2),
+ cache_type, cache_array);
{
// TODO(dcarney): this check is actually supposed to be for the
// empty enum case only.
@@ -749,16 +745,10 @@ void AstGraphBuilder::VisitForInBody(ForInStatement* stmt) {
Node* function = BuildLoadObjectField(
builtins,
JSBuiltinsObject::OffsetOfFunctionWithId(Builtins::FILTER_KEY));
- // Callee.
- environment()->Push(function);
- // Receiver.
- environment()->Push(obj);
- // Args.
- environment()->Push(value);
// result is either the string key or Smi(0) indicating the property
// is gone.
- Node* res = ProcessArguments(
- javascript()->CallFunction(3, NO_CALL_FUNCTION_FLAGS), 3);
+ Node* res = NewNode(javascript()->CallFunction(3, NO_CALL_FUNCTION_FLAGS),
+ function, obj, value);
// TODO(jarin): provide real bailout id.
PrepareFrameState(res, BailoutId::None());
Node* property_missing =
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698