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

Side by Side Diff: src/hydrogen.cc

Issue 23983043: Fix Environment size mismatch in r6849. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-binop.js » ('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 7626 matching lines...) Expand 10 before | Expand all | Expand 10 after
7637 HValue* HGraphBuilder::TruncateToNumber(HValue* value, Handle<Type>* expected) { 7637 HValue* HGraphBuilder::TruncateToNumber(HValue* value, Handle<Type>* expected) {
7638 if (value->IsConstant()) { 7638 if (value->IsConstant()) {
7639 HConstant* constant = HConstant::cast(value); 7639 HConstant* constant = HConstant::cast(value);
7640 Maybe<HConstant*> number = constant->CopyToTruncatedNumber(zone()); 7640 Maybe<HConstant*> number = constant->CopyToTruncatedNumber(zone());
7641 if (number.has_value) { 7641 if (number.has_value) {
7642 *expected = handle(Type::Number(), isolate()); 7642 *expected = handle(Type::Number(), isolate());
7643 return AddInstruction(number.value); 7643 return AddInstruction(number.value);
7644 } 7644 }
7645 } 7645 }
7646 7646
7647 // We put temporary values on the stack, which don't correspond to anything
7648 // in baseline code. Since nothing is observable we avoid recording those
7649 // pushes with a NoObservableSideEffectsScope.
7650 NoObservableSideEffectsScope no_effects(this);
7651
7647 Handle<Type> expected_type = *expected; 7652 Handle<Type> expected_type = *expected;
7648 7653
7649 // Separate the number type from the rest. 7654 // Separate the number type from the rest.
7650 Handle<Type> expected_obj = handle(Type::Intersect( 7655 Handle<Type> expected_obj = handle(Type::Intersect(
7651 expected_type, handle(Type::NonNumber(), isolate())), isolate()); 7656 expected_type, handle(Type::NonNumber(), isolate())), isolate());
7652 Handle<Type> expected_number = handle(Type::Intersect( 7657 Handle<Type> expected_number = handle(Type::Intersect(
7653 expected_type, handle(Type::Number(), isolate())), isolate()); 7658 expected_type, handle(Type::Number(), isolate())), isolate());
7654 7659
7655 // We expect to get a number. 7660 // We expect to get a number.
7656 // (We need to check first, since Type::None->Is(Type::Any()) == true. 7661 // (We need to check first, since Type::None->Is(Type::Any()) == true.
(...skipping 2081 matching lines...) Expand 10 before | Expand all | Expand 10 after
9738 if (ShouldProduceTraceOutput()) { 9743 if (ShouldProduceTraceOutput()) {
9739 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 9744 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
9740 } 9745 }
9741 9746
9742 #ifdef DEBUG 9747 #ifdef DEBUG
9743 graph_->Verify(false); // No full verify. 9748 graph_->Verify(false); // No full verify.
9744 #endif 9749 #endif
9745 } 9750 }
9746 9751
9747 } } // namespace v8::internal 9752 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-binop.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698