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

Side by Side Diff: src/hydrogen.cc

Issue 131103021: Replace HThrow with HCallRuntime. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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/lithium-codegen-arm.cc ('k') | src/hydrogen-instructions.h » ('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 6236 matching lines...) Expand 10 before | Expand all | Expand 10 after
6247 ASSERT(current_block() != NULL); 6247 ASSERT(current_block() != NULL);
6248 ASSERT(current_block()->HasPredecessor()); 6248 ASSERT(current_block()->HasPredecessor());
6249 // We don't optimize functions with invalid left-hand sides in 6249 // We don't optimize functions with invalid left-hand sides in
6250 // assignments, count operations, or for-in. Consequently throw can 6250 // assignments, count operations, or for-in. Consequently throw can
6251 // currently only occur in an effect context. 6251 // currently only occur in an effect context.
6252 ASSERT(ast_context()->IsEffect()); 6252 ASSERT(ast_context()->IsEffect());
6253 CHECK_ALIVE(VisitForValue(expr->exception())); 6253 CHECK_ALIVE(VisitForValue(expr->exception()));
6254 6254
6255 HValue* value = environment()->Pop(); 6255 HValue* value = environment()->Pop();
6256 if (!FLAG_emit_opt_code_positions) SetSourcePosition(expr->position()); 6256 if (!FLAG_emit_opt_code_positions) SetSourcePosition(expr->position());
6257 Add<HThrow>(value); 6257 Add<HPushArgument>(value);
6258 Add<HCallRuntime>(isolate()->factory()->empty_string(),
6259 Runtime::FunctionForId(Runtime::kThrow), 1);
6258 Add<HSimulate>(expr->id()); 6260 Add<HSimulate>(expr->id());
6259 6261
6260 // If the throw definitely exits the function, we can finish with a dummy 6262 // If the throw definitely exits the function, we can finish with a dummy
6261 // control flow at this point. This is not the case if the throw is inside 6263 // control flow at this point. This is not the case if the throw is inside
6262 // an inlined function which may be replaced. 6264 // an inlined function which may be replaced.
6263 if (call_context() == NULL) { 6265 if (call_context() == NULL) {
6264 FinishExitCurrentBlock(New<HAbnormalExit>()); 6266 FinishExitCurrentBlock(New<HAbnormalExit>());
6265 } 6267 }
6266 } 6268 }
6267 6269
(...skipping 4973 matching lines...) Expand 10 before | Expand all | Expand 10 after
11241 if (ShouldProduceTraceOutput()) { 11243 if (ShouldProduceTraceOutput()) {
11242 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 11244 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
11243 } 11245 }
11244 11246
11245 #ifdef DEBUG 11247 #ifdef DEBUG
11246 graph_->Verify(false); // No full verify. 11248 graph_->Verify(false); // No full verify.
11247 #endif 11249 #endif
11248 } 11250 }
11249 11251
11250 } } // namespace v8::internal 11252 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698