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

Side by Side Diff: src/ast.cc

Issue 888613002: Initial switch to Chromium-style CHECK_* and DCHECK_* macros. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix slow dchecks. Created 5 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
« no previous file with comments | « src/ast.h ('k') | src/base/logging.h » ('j') | src/checks.cc » ('J')
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 // 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/ast.h" 5 #include "src/ast.h"
6 6
7 #include <cmath> // For isfinite. 7 #include <cmath> // For isfinite.
8 #include "src/builtins.h" 8 #include "src/builtins.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/contexts.h" 10 #include "src/contexts.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 return scope()->end_position(); 145 return scope()->end_position();
146 } 146 }
147 147
148 148
149 StrictMode FunctionLiteral::strict_mode() const { 149 StrictMode FunctionLiteral::strict_mode() const {
150 return scope()->strict_mode(); 150 return scope()->strict_mode();
151 } 151 }
152 152
153 153
154 bool FunctionLiteral::uses_super_property() const { 154 bool FunctionLiteral::uses_super_property() const {
155 DCHECK_NOT_NULL(scope()); 155 DCHECK(scope());
156 return scope()->uses_super_property() || scope()->inner_uses_super_property(); 156 return scope()->uses_super_property() || scope()->inner_uses_super_property();
157 } 157 }
158 158
159 159
160 bool FunctionLiteral::uses_super_constructor_call() const { 160 bool FunctionLiteral::uses_super_constructor_call() const {
161 DCHECK_NOT_NULL(scope()); 161 DCHECK(scope());
162 return scope()->uses_super_constructor_call() || 162 return scope()->uses_super_constructor_call() ||
163 scope()->inner_uses_super_constructor_call(); 163 scope()->inner_uses_super_constructor_call();
164 } 164 }
165 165
166 166
167 // Helper to find an existing shared function info in the baseline code for the 167 // Helper to find an existing shared function info in the baseline code for the
168 // given function literal. Used to canonicalize SharedFunctionInfo objects. 168 // given function literal. Used to canonicalize SharedFunctionInfo objects.
169 void FunctionLiteral::InitializeSharedInfo( 169 void FunctionLiteral::InitializeSharedInfo(
170 Handle<Code> unoptimized_code) { 170 Handle<Code> unoptimized_code) {
171 for (RelocIterator it(*unoptimized_code); !it.done(); it.next()) { 171 for (RelocIterator it(*unoptimized_code); !it.done(); it.next()) {
(...skipping 864 matching lines...) Expand 10 before | Expand all | Expand 10 after
1036 // static 1036 // static
1037 bool Literal::Match(void* literal1, void* literal2) { 1037 bool Literal::Match(void* literal1, void* literal2) {
1038 const AstValue* x = static_cast<Literal*>(literal1)->raw_value(); 1038 const AstValue* x = static_cast<Literal*>(literal1)->raw_value();
1039 const AstValue* y = static_cast<Literal*>(literal2)->raw_value(); 1039 const AstValue* y = static_cast<Literal*>(literal2)->raw_value();
1040 return (x->IsString() && y->IsString() && *x->AsString() == *y->AsString()) || 1040 return (x->IsString() && y->IsString() && *x->AsString() == *y->AsString()) ||
1041 (x->IsNumber() && y->IsNumber() && x->AsNumber() == y->AsNumber()); 1041 (x->IsNumber() && y->IsNumber() && x->AsNumber() == y->AsNumber());
1042 } 1042 }
1043 1043
1044 1044
1045 } } // namespace v8::internal 1045 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ast.h ('k') | src/base/logging.h » ('j') | src/checks.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698