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

Side by Side Diff: src/runtime.h

Issue 10915062: Add checks to runtime functions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 3 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 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 F(WeakMapSet, 3, 1) \ 318 F(WeakMapSet, 3, 1) \
319 \ 319 \
320 /* Statements */ \ 320 /* Statements */ \
321 F(NewClosure, 3, 1) \ 321 F(NewClosure, 3, 1) \
322 F(NewObject, 1, 1) \ 322 F(NewObject, 1, 1) \
323 F(NewObjectFromBound, 1, 1) \ 323 F(NewObjectFromBound, 1, 1) \
324 F(FinalizeInstanceSize, 1, 1) \ 324 F(FinalizeInstanceSize, 1, 1) \
325 F(Throw, 1, 1) \ 325 F(Throw, 1, 1) \
326 F(ReThrow, 1, 1) \ 326 F(ReThrow, 1, 1) \
327 F(ThrowReferenceError, 1, 1) \ 327 F(ThrowReferenceError, 1, 1) \
328 F(ThrowNotDateError, 0, 1) \
328 F(StackGuard, 0, 1) \ 329 F(StackGuard, 0, 1) \
329 F(Interrupt, 0, 1) \ 330 F(Interrupt, 0, 1) \
330 F(PromoteScheduledException, 0, 1) \ 331 F(PromoteScheduledException, 0, 1) \
331 \ 332 \
332 /* Contexts */ \ 333 /* Contexts */ \
333 F(NewGlobalContext, 2, 1) \ 334 F(NewGlobalContext, 2, 1) \
334 F(NewFunctionContext, 1, 1) \ 335 F(NewFunctionContext, 1, 1) \
335 F(PushWithContext, 2, 1) \ 336 F(PushWithContext, 2, 1) \
336 F(PushCatchContext, 3, 1) \ 337 F(PushCatchContext, 3, 1) \
337 F(PushBlockContext, 2, 1) \ 338 F(PushBlockContext, 2, 1) \
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 // Alternatively, heap initialization can be completely restarted. 641 // Alternatively, heap initialization can be completely restarted.
641 MUST_USE_RESULT static MaybeObject* InitializeIntrinsicFunctionNames( 642 MUST_USE_RESULT static MaybeObject* InitializeIntrinsicFunctionNames(
642 Heap* heap, Object* dictionary); 643 Heap* heap, Object* dictionary);
643 644
644 // Get the intrinsic function with the given name, which must be a symbol. 645 // Get the intrinsic function with the given name, which must be a symbol.
645 static const Function* FunctionForSymbol(Handle<String> name); 646 static const Function* FunctionForSymbol(Handle<String> name);
646 647
647 // Get the intrinsic function with the given FunctionId. 648 // Get the intrinsic function with the given FunctionId.
648 static const Function* FunctionForId(FunctionId id); 649 static const Function* FunctionForId(FunctionId id);
649 650
650 static Handle<String> StringReplaceOneCharWithString(Isolate* isolate,
651 Handle<String> subject,
652 Handle<String> search,
653 Handle<String> replace,
654 bool* found,
655 int recursion_limit);
656
657 // General-purpose helper functions for runtime system. 651 // General-purpose helper functions for runtime system.
658 static int StringMatch(Isolate* isolate, 652 static int StringMatch(Isolate* isolate,
659 Handle<String> sub, 653 Handle<String> sub,
660 Handle<String> pat, 654 Handle<String> pat,
661 int index); 655 int index);
662 656
663 static bool IsUpperCaseChar(RuntimeState* runtime_state, uint16_t ch); 657 static bool IsUpperCaseChar(RuntimeState* runtime_state, uint16_t ch);
664 658
665 // TODO(1240886): Some of the following methods are *not* handle safe, but 659 // TODO(1240886): Some of the following methods are *not* handle safe, but
666 // accept handle arguments. This seems fragile. 660 // accept handle arguments. This seems fragile.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 //--------------------------------------------------------------------------- 704 //---------------------------------------------------------------------------
711 // Constants used by interface to runtime functions. 705 // Constants used by interface to runtime functions.
712 706
713 class DeclareGlobalsEvalFlag: public BitField<bool, 0, 1> {}; 707 class DeclareGlobalsEvalFlag: public BitField<bool, 0, 1> {};
714 class DeclareGlobalsNativeFlag: public BitField<bool, 1, 1> {}; 708 class DeclareGlobalsNativeFlag: public BitField<bool, 1, 1> {};
715 class DeclareGlobalsLanguageMode: public BitField<LanguageMode, 2, 2> {}; 709 class DeclareGlobalsLanguageMode: public BitField<LanguageMode, 2, 2> {};
716 710
717 } } // namespace v8::internal 711 } } // namespace v8::internal
718 712
719 #endif // V8_RUNTIME_H_ 713 #endif // V8_RUNTIME_H_
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