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

Side by Side Diff: src/compiler/js-context-specialization.cc

Issue 430503007: Rename ASSERT* to DCHECK*. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE and fixes Created 6 years, 4 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/compiler/instruction-selector-impl.h ('k') | src/compiler/js-graph.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/common-operator.h" 5 #include "src/compiler/common-operator.h"
6 #include "src/compiler/generic-node-inl.h" 6 #include "src/compiler/generic-node-inl.h"
7 #include "src/compiler/js-context-specialization.h" 7 #include "src/compiler/js-context-specialization.h"
8 #include "src/compiler/js-operator.h" 8 #include "src/compiler/js-operator.h"
9 #include "src/compiler/node-aux-data-inl.h" 9 #include "src/compiler/node-aux-data-inl.h"
10 #include "src/compiler/node-matchers.h" 10 #include "src/compiler/node-matchers.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 if (r.Changed() && r.replacement() != use) { 43 if (r.Changed() && r.replacement() != use) {
44 ReplaceEffectfulWithValue(use, r.replacement()); 44 ReplaceEffectfulWithValue(use, r.replacement());
45 } 45 }
46 } 46 }
47 ++iter; 47 ++iter;
48 } 48 }
49 } 49 }
50 50
51 51
52 Reduction JSContextSpecializer::ReduceJSLoadContext(Node* node) { 52 Reduction JSContextSpecializer::ReduceJSLoadContext(Node* node) {
53 ASSERT_EQ(IrOpcode::kJSLoadContext, node->opcode()); 53 DCHECK_EQ(IrOpcode::kJSLoadContext, node->opcode());
54 54
55 ContextAccess access = 55 ContextAccess access =
56 static_cast<Operator1<ContextAccess>*>(node->op())->parameter(); 56 static_cast<Operator1<ContextAccess>*>(node->op())->parameter();
57 57
58 // Find the right parent context. 58 // Find the right parent context.
59 Context* context = *info_->context(); 59 Context* context = *info_->context();
60 for (int i = access.depth(); i > 0; --i) { 60 for (int i = access.depth(); i > 0; --i) {
61 context = context->previous(); 61 context = context->previous();
62 } 62 }
63 63
(...skipping 20 matching lines...) Expand all
84 if (value->IsUndefined() || value->IsTheHole()) return Reducer::NoChange(); 84 if (value->IsUndefined() || value->IsTheHole()) return Reducer::NoChange();
85 85
86 // Success. The context load can be replaced with the constant. 86 // Success. The context load can be replaced with the constant.
87 // TODO(titzer): record the specialization for sharing code across multiple 87 // TODO(titzer): record the specialization for sharing code across multiple
88 // contexts that have the same value in the corresponding context slot. 88 // contexts that have the same value in the corresponding context slot.
89 return Reducer::Replace(jsgraph_->Constant(value)); 89 return Reducer::Replace(jsgraph_->Constant(value));
90 } 90 }
91 } 91 }
92 } 92 }
93 } // namespace v8::internal::compiler 93 } // namespace v8::internal::compiler
OLDNEW
« no previous file with comments | « src/compiler/instruction-selector-impl.h ('k') | src/compiler/js-graph.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698