OLD | NEW |
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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 } | 172 } |
173 | 173 |
174 | 174 |
175 LanguageMode FunctionLiteral::language_mode() const { | 175 LanguageMode FunctionLiteral::language_mode() const { |
176 return scope()->language_mode(); | 176 return scope()->language_mode(); |
177 } | 177 } |
178 | 178 |
179 | 179 |
180 bool FunctionLiteral::uses_super_property() const { | 180 bool FunctionLiteral::uses_super_property() const { |
181 DCHECK_NOT_NULL(scope()); | 181 DCHECK_NOT_NULL(scope()); |
182 return scope()->uses_super_property() || scope()->inner_uses_super_property(); | 182 return scope()->uses_super_property(); |
183 } | 183 } |
184 | 184 |
185 | 185 |
186 // Helper to find an existing shared function info in the baseline code for the | 186 // Helper to find an existing shared function info in the baseline code for the |
187 // given function literal. Used to canonicalize SharedFunctionInfo objects. | 187 // given function literal. Used to canonicalize SharedFunctionInfo objects. |
188 void FunctionLiteral::InitializeSharedInfo( | 188 void FunctionLiteral::InitializeSharedInfo( |
189 Handle<Code> unoptimized_code) { | 189 Handle<Code> unoptimized_code) { |
190 for (RelocIterator it(*unoptimized_code); !it.done(); it.next()) { | 190 for (RelocIterator it(*unoptimized_code); !it.done(); it.next()) { |
191 RelocInfo* rinfo = it.rinfo(); | 191 RelocInfo* rinfo = it.rinfo(); |
192 if (rinfo->rmode() != RelocInfo::EMBEDDED_OBJECT) continue; | 192 if (rinfo->rmode() != RelocInfo::EMBEDDED_OBJECT) continue; |
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1011 // static | 1011 // static |
1012 bool Literal::Match(void* literal1, void* literal2) { | 1012 bool Literal::Match(void* literal1, void* literal2) { |
1013 const AstValue* x = static_cast<Literal*>(literal1)->raw_value(); | 1013 const AstValue* x = static_cast<Literal*>(literal1)->raw_value(); |
1014 const AstValue* y = static_cast<Literal*>(literal2)->raw_value(); | 1014 const AstValue* y = static_cast<Literal*>(literal2)->raw_value(); |
1015 return (x->IsString() && y->IsString() && x->AsString() == y->AsString()) || | 1015 return (x->IsString() && y->IsString() && x->AsString() == y->AsString()) || |
1016 (x->IsNumber() && y->IsNumber() && x->AsNumber() == y->AsNumber()); | 1016 (x->IsNumber() && y->IsNumber() && x->AsNumber() == y->AsNumber()); |
1017 } | 1017 } |
1018 | 1018 |
1019 | 1019 |
1020 } } // namespace v8::internal | 1020 } } // namespace v8::internal |
OLD | NEW |