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

Side by Side Diff: src/parser.cc

Issue 16337005: Deprecate FACTORY helper macro. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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/objects.cc ('k') | src/runtime.cc » ('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 // 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 3827 matching lines...) Expand 10 before | Expand all | Expand 10 after
3838 // boilerplate object. 3838 // boilerplate object.
3839 if (value->AsLiteral() != NULL) return false; 3839 if (value->AsLiteral() != NULL) return false;
3840 // If value is a materialized literal the property value is already set 3840 // If value is a materialized literal the property value is already set
3841 // in the boilerplate object if it is simple. 3841 // in the boilerplate object if it is simple.
3842 if (CompileTimeValue::IsCompileTimeValue(value)) return false; 3842 if (CompileTimeValue::IsCompileTimeValue(value)) return false;
3843 return true; 3843 return true;
3844 } 3844 }
3845 3845
3846 3846
3847 Handle<FixedArray> CompileTimeValue::GetValue(Expression* expression) { 3847 Handle<FixedArray> CompileTimeValue::GetValue(Expression* expression) {
3848 Factory* factory = Isolate::Current()->factory();
3848 ASSERT(IsCompileTimeValue(expression)); 3849 ASSERT(IsCompileTimeValue(expression));
3849 Handle<FixedArray> result = FACTORY->NewFixedArray(2, TENURED); 3850 Handle<FixedArray> result = factory->NewFixedArray(2, TENURED);
3850 ObjectLiteral* object_literal = expression->AsObjectLiteral(); 3851 ObjectLiteral* object_literal = expression->AsObjectLiteral();
3851 if (object_literal != NULL) { 3852 if (object_literal != NULL) {
3852 ASSERT(object_literal->is_simple()); 3853 ASSERT(object_literal->is_simple());
3853 if (object_literal->fast_elements()) { 3854 if (object_literal->fast_elements()) {
3854 result->set(kTypeSlot, Smi::FromInt(OBJECT_LITERAL_FAST_ELEMENTS)); 3855 result->set(kTypeSlot, Smi::FromInt(OBJECT_LITERAL_FAST_ELEMENTS));
3855 } else { 3856 } else {
3856 result->set(kTypeSlot, Smi::FromInt(OBJECT_LITERAL_SLOW_ELEMENTS)); 3857 result->set(kTypeSlot, Smi::FromInt(OBJECT_LITERAL_SLOW_ELEMENTS));
3857 } 3858 }
3858 result->set(kElementsSlot, *object_literal->constant_properties()); 3859 result->set(kElementsSlot, *object_literal->constant_properties());
3859 } else { 3860 } else {
(...skipping 2167 matching lines...) Expand 10 before | Expand all | Expand 10 after
6027 ASSERT(info()->isolate()->has_pending_exception()); 6028 ASSERT(info()->isolate()->has_pending_exception());
6028 } else { 6029 } else {
6029 result = ParseProgram(); 6030 result = ParseProgram();
6030 } 6031 }
6031 } 6032 }
6032 info()->SetFunction(result); 6033 info()->SetFunction(result);
6033 return (result != NULL); 6034 return (result != NULL);
6034 } 6035 }
6035 6036
6036 } } // namespace v8::internal 6037 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698