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

Side by Side Diff: src/code-stubs-hydrogen.cc

Issue 12300018: Made Isolate a mandatory parameter for everything Handle-related. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed CreateCode calls. Be nicer to MIPS. Created 7 years, 9 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/code-stubs.cc ('k') | src/compiler.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 18 matching lines...) Expand all
29 29
30 #include "code-stubs.h" 30 #include "code-stubs.h"
31 #include "hydrogen.h" 31 #include "hydrogen.h"
32 #include "lithium.h" 32 #include "lithium.h"
33 33
34 namespace v8 { 34 namespace v8 {
35 namespace internal { 35 namespace internal {
36 36
37 37
38 static LChunk* OptimizeGraph(HGraph* graph) { 38 static LChunk* OptimizeGraph(HGraph* graph) {
39 Isolate* isolate = graph->isolate();
39 AssertNoAllocation no_gc; 40 AssertNoAllocation no_gc;
40 NoHandleAllocation no_handles; 41 NoHandleAllocation no_handles(isolate);
41 NoHandleDereference no_deref; 42 NoHandleDereference no_deref(isolate);
42 43
43 ASSERT(graph != NULL); 44 ASSERT(graph != NULL);
44 SmartArrayPointer<char> bailout_reason; 45 SmartArrayPointer<char> bailout_reason;
45 if (!graph->Optimize(&bailout_reason)) { 46 if (!graph->Optimize(&bailout_reason)) {
46 FATAL(bailout_reason.is_empty() ? "unknown" : *bailout_reason); 47 FATAL(bailout_reason.is_empty() ? "unknown" : *bailout_reason);
47 } 48 }
48 LChunk* chunk = LChunk::NewChunk(graph); 49 LChunk* chunk = LChunk::NewChunk(graph);
49 if (chunk == NULL) { 50 if (chunk == NULL) {
50 FATAL(graph->info()->bailout_reason()); 51 FATAL(graph->info()->bailout_reason());
51 } 52 }
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 250
250 251
251 Handle<Code> TransitionElementsKindStub::GenerateCode() { 252 Handle<Code> TransitionElementsKindStub::GenerateCode() {
252 CodeStubGraphBuilder<TransitionElementsKindStub> builder(this); 253 CodeStubGraphBuilder<TransitionElementsKindStub> builder(this);
253 LChunk* chunk = OptimizeGraph(builder.CreateGraph()); 254 LChunk* chunk = OptimizeGraph(builder.CreateGraph());
254 return chunk->Codegen(Code::COMPILED_STUB); 255 return chunk->Codegen(Code::COMPILED_STUB);
255 } 256 }
256 257
257 258
258 } } // namespace v8::internal 259 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/code-stubs.cc ('k') | src/compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698