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

Unified Diff: src/hydrogen.cc

Issue 1316933002: [es6] Initial steps towards a correct implementation of IsCallable. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase again. Created 5 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/hydrogen.h ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index 6effe1c3967686630218dbf00602bca2e010eb88..46a1e6f5342b71ece037f9057ccf130df4b4aa90 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -12771,53 +12771,6 @@ void HOptimizedGraphBuilder::GenerateDebugIsActive(CallRuntime* call) {
}
-void HOptimizedGraphBuilder::GenerateGetPrototype(CallRuntime* call) {
- DCHECK(call->arguments()->length() == 1);
- CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
- HValue* object = Pop();
-
- NoObservableSideEffectsScope no_effects(this);
-
- HValue* map = Add<HLoadNamedField>(object, nullptr, HObjectAccess::ForMap());
- HValue* bit_field =
- Add<HLoadNamedField>(map, nullptr, HObjectAccess::ForMapBitField());
- HValue* is_access_check_needed_mask =
- Add<HConstant>(1 << Map::kIsAccessCheckNeeded);
- HValue* is_access_check_needed_test = AddUncasted<HBitwise>(
- Token::BIT_AND, bit_field, is_access_check_needed_mask);
-
- HValue* proto =
- Add<HLoadNamedField>(map, nullptr, HObjectAccess::ForPrototype());
- HValue* proto_map =
- Add<HLoadNamedField>(proto, nullptr, HObjectAccess::ForMap());
- HValue* proto_bit_field =
- Add<HLoadNamedField>(proto_map, nullptr, HObjectAccess::ForMapBitField());
- HValue* is_hidden_prototype_mask =
- Add<HConstant>(1 << Map::kIsHiddenPrototype);
- HValue* is_hidden_prototype_test = AddUncasted<HBitwise>(
- Token::BIT_AND, proto_bit_field, is_hidden_prototype_mask);
-
- {
- IfBuilder needs_runtime(this);
- needs_runtime.If<HCompareNumericAndBranch>(
- is_access_check_needed_test, graph()->GetConstant0(), Token::NE);
- needs_runtime.OrIf<HCompareNumericAndBranch>(
- is_hidden_prototype_test, graph()->GetConstant0(), Token::NE);
-
- needs_runtime.Then();
- {
- Add<HPushArguments>(object);
- Push(
- Add<HCallRuntime>(Runtime::FunctionForId(Runtime::kGetPrototype), 1));
- }
-
- needs_runtime.Else();
- Push(proto);
- }
- return ast_context()->ReturnValue(Pop());
-}
-
-
#undef CHECK_BAILOUT
#undef CHECK_ALIVE
« no previous file with comments | « src/hydrogen.h ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698