This removes roughly 5k invocations of Isolate::Current from the string-tagcloud
benchmark.
Review URL: https://chromiumcodereview.appspot.com/
9490009
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10859
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
}
-ObjectLiteral::Property::Property(Literal* key, Expression* value) {
+ObjectLiteral::Property::Property(Literal* key,
+ Expression* value,
+ Isolate* isolate) {
emit_store_ = true;
key_ = key;
value_ = value;
Object* k = *key->handle();
- if (k->IsSymbol() && HEAP->Proto_symbol()->Equals(String::cast(k))) {
+ if (k->IsSymbol() &&
+ isolate->heap()->Proto_symbol()->Equals(String::cast(k))) {
kind_ = PROTOTYPE;
} else if (value_->AsMaterializedLiteral() != NULL) {
kind_ = MATERIALIZED_LITERAL;
PROTOTYPE // Property is __proto__.
};
- Property(Literal* key, Expression* value);
+ Property(Literal* key, Expression* value, Isolate* isolate);
Literal* key() { return key_; }
Expression* value() { return value_; }
Expression* value = ParseAssignmentExpression(true, CHECK_OK);
ObjectLiteral::Property* property =
- new(zone()) ObjectLiteral::Property(key, value);
+ new(zone()) ObjectLiteral::Property(key, value, isolate());
// Mark top-level object literals that contain function literals and
// pretenure the literal so it can be added as a constant function