VM Maker: VMMaker.oscog-eem.2801.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

VM Maker: VMMaker.oscog-eem.2801.mcz

commits-2
 
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2801.mcz

==================== Summary ====================

Name: VMMaker.oscog-eem.2801
Author: eem
Time: 7 September 2020, 1:41:02.917292 pm
UUID: 2b0b2f8d-d2f7-46f6-b2ff-ab143629b4ee
Ancestors: VMMaker.oscog-eem.2800

Warning et al must take a const char * argument to avoid C++ warnings/errors.  One can only pass a string constant to a const char * in C++.

=============== Diff against VMMaker.oscog-eem.2800 ===============

Item was changed:
  ----- Method: CoInterpreter>>error: (in category 'cog jit support') -----
  error: aString
+ <api: 'extern void error(const char *s)'>
- <api: 'extern void error(char *s)'>
  <doNotGenerate>
  super error: aString!

Item was changed:
  ----- Method: CoInterpreter>>warning: (in category 'cog jit support') -----
  warning: aString
+ <api: 'extern void warning(const char *s)'>
- <api: 'extern void warning(char *s)'>
  <doNotGenerate>
  self transcript cr; nextPutAll: aString; flush!

Item was added:
+ ----- Method: CoInterpreter>>warning:at: (in category 'cog jit support') -----
+ warning: aString at: lineNumber
+ <api: 'extern void warningat(const char *s, int l)'>
+ <doNotGenerate>
+ self transcript cr; nextPutAll: aString; space; print: lineNumber; flush!

Item was changed:
  ----- Method: InterpreterProxy>>error: (in category 'other') -----
  error: aString
  <returnTypeC: #void>
+ <var: 'aString' type: #'const char *'>
- <var: 'aString' type: #'char *'>
  "In the real VM this prints aString to stderr and then calls exit(-1) or abort()."
  ^super error: aString!

Item was changed:
  ----- Method: StackInterpreter class>>preambleCCode (in category 'translation') -----
  preambleCCode
  ^
  '/* Disable Intel compiler inlining of warning which is used for breakpoints */
  #pragma auto_inline(off)
  sqInt warnpid, erroronwarn;
  EXPORT(void)
+ warning(const char *s) { /* Print an error message but don''t necessarily exit. */
- warning(char *s) { /* Print an error message but don''t necessarily exit. */
  if (erroronwarn) error(s);
  if (warnpid)
  printf("\n%s pid %ld\n", s, (long)warnpid);
  else
  printf("\n%s\n", s);
  }
  EXPORT(void)
+ warningat(const char *s, int l) { /* ditto with line number. */
- warningat(char *s, int l) { /* ditto with line number. */
  /* use alloca to call warning so one does not have to remember to set two breakpoints... */
  char *sl = alloca(strlen(s) + 16);
  sprintf(sl, "%s %d", s, l);
  warning(sl);
  }
  #pragma auto_inline(on)
  '!