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

Side by Side Diff: src/ast.cc

Issue 1069423003: Remove comparison operator and helper function from AstRawString interface (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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 | « no previous file | src/ast-value-factory.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 // 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 986 matching lines...) Expand 10 before | Expand all | Expand 10 after
997 return raw_value()->IsString() 997 return raw_value()->IsString()
998 ? raw_value()->AsString()->hash() 998 ? raw_value()->AsString()->hash()
999 : ComputeLongHash(double_to_uint64(raw_value()->AsNumber())); 999 : ComputeLongHash(double_to_uint64(raw_value()->AsNumber()));
1000 } 1000 }
1001 1001
1002 1002
1003 // static 1003 // static
1004 bool Literal::Match(void* literal1, void* literal2) { 1004 bool Literal::Match(void* literal1, void* literal2) {
1005 const AstValue* x = static_cast<Literal*>(literal1)->raw_value(); 1005 const AstValue* x = static_cast<Literal*>(literal1)->raw_value();
1006 const AstValue* y = static_cast<Literal*>(literal2)->raw_value(); 1006 const AstValue* y = static_cast<Literal*>(literal2)->raw_value();
1007 return (x->IsString() && y->IsString() && *x->AsString() == *y->AsString()) || 1007 return (x->IsString() && y->IsString() && x->AsString() == y->AsString()) ||
1008 (x->IsNumber() && y->IsNumber() && x->AsNumber() == y->AsNumber()); 1008 (x->IsNumber() && y->IsNumber() && x->AsNumber() == y->AsNumber());
1009 } 1009 }
1010 1010
1011 1011
1012 } } // namespace v8::internal 1012 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/ast-value-factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698