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

Unified Diff: src/ast.h

Issue 620113002: Removed the Isolate* field from literal nodes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/ast.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast.h
diff --git a/src/ast.h b/src/ast.h
index 4bd65aee205cad8a5e463a3809fe0e34dd3d24b3..5ef471377bf11e6000b274948b603d6f7a21ea6e 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -1385,28 +1385,17 @@ class Literal FINAL : public Expression {
// Support for using Literal as a HashMap key. NOTE: Currently, this works
// only for string and number literals!
- uint32_t Hash() { return ToString()->Hash(); }
-
- static bool Match(void* literal1, void* literal2) {
- Handle<String> s1 = static_cast<Literal*>(literal1)->ToString();
- Handle<String> s2 = static_cast<Literal*>(literal2)->ToString();
- return String::Equals(s1, s2);
- }
+ uint32_t Hash();
+ static bool Match(void* literal1, void* literal2);
TypeFeedbackId LiteralFeedbackId() const { return reuse(id()); }
protected:
Literal(Zone* zone, const AstValue* value, int position, IdGen* id_gen)
- : Expression(zone, position, id_gen),
- value_(value),
- isolate_(zone->isolate()) {}
+ : Expression(zone, position, id_gen), value_(value) {}
private:
- Handle<String> ToString();
-
const AstValue* value_;
- // TODO(dcarney): remove. this is only needed for Match and Hash.
- Isolate* isolate_;
};
« no previous file with comments | « no previous file | src/ast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698