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

Side by Side Diff: src/parser.cc

Issue 9490009: Thread isolate through Property constructor, avoiding Isolate::Current. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « src/ast.cc ('k') | no next file » | 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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 3973 matching lines...) Expand 10 before | Expand all | Expand 10 after
3984 ReportUnexpectedToken(next); 3984 ReportUnexpectedToken(next);
3985 *ok = false; 3985 *ok = false;
3986 return NULL; 3986 return NULL;
3987 } 3987 }
3988 } 3988 }
3989 3989
3990 Expect(Token::COLON, CHECK_OK); 3990 Expect(Token::COLON, CHECK_OK);
3991 Expression* value = ParseAssignmentExpression(true, CHECK_OK); 3991 Expression* value = ParseAssignmentExpression(true, CHECK_OK);
3992 3992
3993 ObjectLiteral::Property* property = 3993 ObjectLiteral::Property* property =
3994 new(zone()) ObjectLiteral::Property(key, value); 3994 new(zone()) ObjectLiteral::Property(key, value, isolate());
3995 3995
3996 // Mark top-level object literals that contain function literals and 3996 // Mark top-level object literals that contain function literals and
3997 // pretenure the literal so it can be added as a constant function 3997 // pretenure the literal so it can be added as a constant function
3998 // property. 3998 // property.
3999 if (top_scope_->DeclarationScope()->is_global_scope() && 3999 if (top_scope_->DeclarationScope()->is_global_scope() &&
4000 value->AsFunctionLiteral() != NULL) { 4000 value->AsFunctionLiteral() != NULL) {
4001 has_function = true; 4001 has_function = true;
4002 value->AsFunctionLiteral()->set_pretenure(); 4002 value->AsFunctionLiteral()->set_pretenure();
4003 } 4003 }
4004 4004
(...skipping 1804 matching lines...) Expand 10 before | Expand all | Expand 10 after
5809 ASSERT(info->isolate()->has_pending_exception()); 5809 ASSERT(info->isolate()->has_pending_exception());
5810 } else { 5810 } else {
5811 result = parser.ParseProgram(info); 5811 result = parser.ParseProgram(info);
5812 } 5812 }
5813 } 5813 }
5814 info->SetFunction(result); 5814 info->SetFunction(result);
5815 return (result != NULL); 5815 return (result != NULL);
5816 } 5816 }
5817 5817
5818 } } // namespace v8::internal 5818 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ast.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698