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

Side by Side Diff: src/objects.h

Issue 6286043: Direct call to eval passes strict mode through. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Code review feedback. Created 9 years, 10 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/ia32/full-codegen-ia32.cc ('k') | src/objects.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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 4152 matching lines...) Expand 10 before | Expand all | Expand 10 after
4163 inline int code_age(); 4163 inline int code_age();
4164 inline void set_code_age(int age); 4164 inline void set_code_age(int age);
4165 4165
4166 // Indicates whether optimizations have been disabled for this 4166 // Indicates whether optimizations have been disabled for this
4167 // shared function info. If a function is repeatedly optimized or if 4167 // shared function info. If a function is repeatedly optimized or if
4168 // we cannot optimize the function we disable optimization to avoid 4168 // we cannot optimize the function we disable optimization to avoid
4169 // spending time attempting to optimize it again. 4169 // spending time attempting to optimize it again.
4170 inline bool optimization_disabled(); 4170 inline bool optimization_disabled();
4171 inline void set_optimization_disabled(bool value); 4171 inline void set_optimization_disabled(bool value);
4172 4172
4173 // Indicates whether the function is a strict mode function.
4174 inline bool strict_mode();
4175 inline void set_strict_mode(bool value);
4176
4173 // Indicates whether or not the code in the shared function support 4177 // Indicates whether or not the code in the shared function support
4174 // deoptimization. 4178 // deoptimization.
4175 inline bool has_deoptimization_support(); 4179 inline bool has_deoptimization_support();
4176 4180
4177 // Enable deoptimization support through recompiled code. 4181 // Enable deoptimization support through recompiled code.
4178 void EnableDeoptimizationSupport(Code* recompiled); 4182 void EnableDeoptimizationSupport(Code* recompiled);
4179 4183
4180 // Lookup the bailout ID and ASSERT that it exists in the non-optimized 4184 // Lookup the bailout ID and ASSERT that it exists in the non-optimized
4181 // code, returns whether it asserted (i.e., always true if assertions are 4185 // code, returns whether it asserted (i.e., always true if assertions are
4182 // disabled). 4186 // disabled).
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
4344 static const int kStartPositionMask = ~((1 << kStartPositionShift) - 1); 4348 static const int kStartPositionMask = ~((1 << kStartPositionShift) - 1);
4345 4349
4346 // Bit positions in compiler_hints. 4350 // Bit positions in compiler_hints.
4347 static const int kHasOnlySimpleThisPropertyAssignments = 0; 4351 static const int kHasOnlySimpleThisPropertyAssignments = 0;
4348 static const int kTryFullCodegen = 1; 4352 static const int kTryFullCodegen = 1;
4349 static const int kAllowLazyCompilation = 2; 4353 static const int kAllowLazyCompilation = 2;
4350 static const int kLiveObjectsMayExist = 3; 4354 static const int kLiveObjectsMayExist = 3;
4351 static const int kCodeAgeShift = 4; 4355 static const int kCodeAgeShift = 4;
4352 static const int kCodeAgeMask = 0x7; 4356 static const int kCodeAgeMask = 0x7;
4353 static const int kOptimizationDisabled = 7; 4357 static const int kOptimizationDisabled = 7;
4358 static const int kStrictModeFunction = 8;
4354 4359
4355 DISALLOW_IMPLICIT_CONSTRUCTORS(SharedFunctionInfo); 4360 DISALLOW_IMPLICIT_CONSTRUCTORS(SharedFunctionInfo);
4356 }; 4361 };
4357 4362
4358 4363
4359 // JSFunction describes JavaScript functions. 4364 // JSFunction describes JavaScript functions.
4360 class JSFunction: public JSObject { 4365 class JSFunction: public JSObject {
4361 public: 4366 public:
4362 // [prototype_or_initial_map]: 4367 // [prototype_or_initial_map]:
4363 DECL_ACCESSORS(prototype_or_initial_map, Object) 4368 DECL_ACCESSORS(prototype_or_initial_map, Object)
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
4827 static const int kPrefixSize = 0; 4832 static const int kPrefixSize = 0;
4828 static const int kEntrySize = 2; 4833 static const int kEntrySize = 2;
4829 }; 4834 };
4830 4835
4831 4836
4832 class CompilationCacheTable: public HashTable<CompilationCacheShape, 4837 class CompilationCacheTable: public HashTable<CompilationCacheShape,
4833 HashTableKey*> { 4838 HashTableKey*> {
4834 public: 4839 public:
4835 // Find cached value for a string key, otherwise return null. 4840 // Find cached value for a string key, otherwise return null.
4836 Object* Lookup(String* src); 4841 Object* Lookup(String* src);
4837 Object* LookupEval(String* src, Context* context); 4842 Object* LookupEval(String* src, Context* context, StrictModeFlag strict_mode);
4838 Object* LookupRegExp(String* source, JSRegExp::Flags flags); 4843 Object* LookupRegExp(String* source, JSRegExp::Flags flags);
4839 MaybeObject* Put(String* src, Object* value); 4844 MaybeObject* Put(String* src, Object* value);
4840 MaybeObject* PutEval(String* src, Context* context, Object* value); 4845 MaybeObject* PutEval(String* src,
4846 Context* context,
4847 SharedFunctionInfo* value);
4841 MaybeObject* PutRegExp(String* src, JSRegExp::Flags flags, FixedArray* value); 4848 MaybeObject* PutRegExp(String* src, JSRegExp::Flags flags, FixedArray* value);
4842 4849
4843 // Remove given value from cache. 4850 // Remove given value from cache.
4844 void Remove(Object* value); 4851 void Remove(Object* value);
4845 4852
4846 static inline CompilationCacheTable* cast(Object* obj); 4853 static inline CompilationCacheTable* cast(Object* obj);
4847 4854
4848 private: 4855 private:
4849 DISALLOW_IMPLICIT_CONSTRUCTORS(CompilationCacheTable); 4856 DISALLOW_IMPLICIT_CONSTRUCTORS(CompilationCacheTable);
4850 }; 4857 };
(...skipping 1573 matching lines...) Expand 10 before | Expand all | Expand 10 after
6424 } else { 6431 } else {
6425 value &= ~(1 << bit_position); 6432 value &= ~(1 << bit_position);
6426 } 6433 }
6427 return value; 6434 return value;
6428 } 6435 }
6429 }; 6436 };
6430 6437
6431 } } // namespace v8::internal 6438 } } // namespace v8::internal
6432 6439
6433 #endif // V8_OBJECTS_H_ 6440 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698