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

Side by Side Diff: src/liveedit.cc

Issue 239543010: Revert "Move functions from handles.cc to where they belong." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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/lithium-codegen.cc ('k') | src/log.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 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 int offset1_; 424 int offset1_;
425 int offset2_; 425 int offset2_;
426 }; 426 };
427 427
428 428
429 // Wraps raw n-elements line_ends array as a list of n+1 lines. The last line 429 // Wraps raw n-elements line_ends array as a list of n+1 lines. The last line
430 // never has terminating new line character. 430 // never has terminating new line character.
431 class LineEndsWrapper { 431 class LineEndsWrapper {
432 public: 432 public:
433 explicit LineEndsWrapper(Handle<String> string) 433 explicit LineEndsWrapper(Handle<String> string)
434 : ends_array_(String::CalculateLineEnds(string, false)), 434 : ends_array_(CalculateLineEnds(string, false)),
435 string_len_(string->length()) { 435 string_len_(string->length()) {
436 } 436 }
437 int length() { 437 int length() {
438 return ends_array_->length() + 1; 438 return ends_array_->length() + 1;
439 } 439 }
440 // Returns start for any line including start of the imaginary line after 440 // Returns start for any line including start of the imaginary line after
441 // the last line. 441 // the last line.
442 int GetLineStart(int index) { 442 int GetLineStart(int index) {
443 if (index == 0) { 443 if (index == 0) {
444 return 0; 444 return 0;
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
845 Factory* factory = isolate->factory(); 845 Factory* factory = isolate->factory();
846 Handle<String> start_pos_key = factory->InternalizeOneByteString( 846 Handle<String> start_pos_key = factory->InternalizeOneByteString(
847 STATIC_ASCII_VECTOR("startPosition")); 847 STATIC_ASCII_VECTOR("startPosition"));
848 Handle<String> end_pos_key = factory->InternalizeOneByteString( 848 Handle<String> end_pos_key = factory->InternalizeOneByteString(
849 STATIC_ASCII_VECTOR("endPosition")); 849 STATIC_ASCII_VECTOR("endPosition"));
850 Handle<String> script_obj_key = factory->InternalizeOneByteString( 850 Handle<String> script_obj_key = factory->InternalizeOneByteString(
851 STATIC_ASCII_VECTOR("scriptObject")); 851 STATIC_ASCII_VECTOR("scriptObject"));
852 Handle<Smi> start_pos( 852 Handle<Smi> start_pos(
853 Smi::FromInt(message_location.start_pos()), isolate); 853 Smi::FromInt(message_location.start_pos()), isolate);
854 Handle<Smi> end_pos(Smi::FromInt(message_location.end_pos()), isolate); 854 Handle<Smi> end_pos(Smi::FromInt(message_location.end_pos()), isolate);
855 Handle<JSObject> script_obj = 855 Handle<JSValue> script_obj = GetScriptWrapper(message_location.script());
856 Script::GetWrapper(message_location.script());
857 JSReceiver::SetProperty( 856 JSReceiver::SetProperty(
858 rethrow_exception, start_pos_key, start_pos, NONE, SLOPPY).Assert(); 857 rethrow_exception, start_pos_key, start_pos, NONE, SLOPPY).Assert();
859 JSReceiver::SetProperty( 858 JSReceiver::SetProperty(
860 rethrow_exception, end_pos_key, end_pos, NONE, SLOPPY).Assert(); 859 rethrow_exception, end_pos_key, end_pos, NONE, SLOPPY).Assert();
861 JSReceiver::SetProperty( 860 JSReceiver::SetProperty(
862 rethrow_exception, script_obj_key, script_obj, NONE, SLOPPY).Assert(); 861 rethrow_exception, script_obj_key, script_obj, NONE, SLOPPY).Assert();
863 } 862 }
864 } 863 }
865 864
866 // A logical 'finally' section. 865 // A logical 'finally' section.
(...skipping 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after
2002 2001
2003 bool LiveEditFunctionTracker::IsActive(Isolate* isolate) { 2002 bool LiveEditFunctionTracker::IsActive(Isolate* isolate) {
2004 return false; 2003 return false;
2005 } 2004 }
2006 2005
2007 #endif // ENABLE_DEBUGGER_SUPPORT 2006 #endif // ENABLE_DEBUGGER_SUPPORT
2008 2007
2009 2008
2010 2009
2011 } } // namespace v8::internal 2010 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/lithium-codegen.cc ('k') | src/log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698